!function(e,s,t,n){"use strict";e.fn.slideAndSwipe=function(s){function t(e,s,t,n){"start"==s&&(r=a.hasClass("ssm-nav-visible")?0:l);var o;"move"==s&&"left"==t?(o=0>r?r-n:-n,i(o,0)):"move"==s&&"right"==t?(o=0>r?r+n:n,i(o,0)):"cancel"==s&&"left"==t&&0===r?i(0,d.speed):"end"==s&&"left"==t?v():"end"!=s&&"cancel"!=s||"right"!=t||console.log("end")}function n(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)}function o(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}function i(s,t){a.css("transition-duration",(t/1e3).toFixed(1)+"s"),s>=0&&(s=0),l>=s&&(s=l),n()||o()?a.css("-webkit-transform","translate("+s+"px,0)"):a.css("transform","translate("+s+"px,0)"),"0"==s&&(e(".ssm-toggle-nav").addClass("ssm-nav-visible"),e("html").css("overflow","hidden"),e(".ssm-overlay").fadeIn())}var a=e(this),l=-a.outerWidth(),r=l,d=e.extend({triggerOnTouchEnd:!0,swipeStatus:t,allowPageScroll:"vertical",threshold:100,excludedElements:"label, button, input, select, textarea, .noSwipe",speed:250},s);a.swipe(d);var v=function(){a.removeClass("ssm-nav-visible"),i(l,d.speed),e("html").css("overflow","visible"),e(".ssm-overlay").fadeOut()},c=function(){a.addClass("ssm-nav-visible"),i(0,d.speed)};e(".ssm-toggle-nav").click(function(){a.hasClass("ssm-nav-visible")?v():c()})}}(window.jQuery||window.$,document,window),"undefined"!=typeof module&&module.exports&&(module.exports=slideAndSwipe);
|