From b149a5693f96a0880eb38c5105606ee1cf783e02 Mon Sep 17 00:00:00 2001 From: Chris Yee Date: Mon, 2 Nov 2020 15:59:42 -0500 Subject: [PATCH] removed submenu var --- js/pushy.js | 3 +-- js/pushy.min.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/pushy.js b/js/pushy.js index 68c0b5f..9615830 100644 --- a/js/pushy.js +++ b/js/pushy.js @@ -16,8 +16,7 @@ menuWidth = pushy.width() + 'px', //jQuery fallback menu width submenuClass = '.pushy-submenu', submenuOpenClass = 'pushy-submenu-open', - submenuClosedClass = 'pushy-submenu-closed', - submenu = $(submenuClass); + submenuClosedClass = 'pushy-submenu-closed'; //check if menu-btn-class data attribute exists if( typeof pushy.data('menu-btn-class') !== 'undefined' ){ diff --git a/js/pushy.min.js b/js/pushy.min.js index 204c502..4a224aa 100644 --- a/js/pushy.min.js +++ b/js/pushy.min.js @@ -1 +1 @@ -!function(a){function b(){g.hasClass(k)?h.toggleClass(l):h.toggleClass(m),o&&g.one("transitionend",function(){o.focus()})}function c(){g.hasClass(k)?h.removeClass(l):h.removeClass(m)}function d(){g.hasClass(k)?(h.addClass(l),g.animate({left:"0px"},p),i.animate({left:q},p),j.animate({left:q},p)):(h.addClass(m),g.animate({right:"0px"},p),i.animate({right:q},p),j.animate({right:q},p)),o&&o.focus()}function e(){g.hasClass(k)?(h.removeClass(l),g.animate({left:"-"+q},p),i.animate({left:"0px"},p),j.animate({left:"0px"},p)):(h.removeClass(m),g.animate({right:"-"+q},p),i.animate({right:"0px"},p),j.animate({right:"0px"},p))}function f(){a(r).addClass(t),a(r).on("click",function(b){var c=a(this);c.hasClass(t)?(c.siblings(r).addClass(t).removeClass(s),c.removeClass(t).addClass(s)):c.addClass(t).removeClass(s),b.stopPropagation()})}var g=a(".pushy"),h=a("body"),i=a("#container"),j=a(".push"),k="pushy-left",l="pushy-open-left",m="pushy-open-right",n=a(".site-overlay"),o=a(g.data("focus")),p=200,q=g.width()+"px",r=".pushy-submenu",s="pushy-submenu-open",t="pushy-submenu-closed";a(r);if(void 0!==g.data("menu-btn-class"))var u=g.data("menu-btn-class");else var u=".menu-btn";var v=a(u+", .pushy-link"),w=a(u);a(document).keyup(function(a){27==a.keyCode&&(h.hasClass(l)||h.hasClass(m))&&(x?c():(e(),y=!1),w&&w.focus())});var x=function(){var a=document.createElement("p"),b=!1,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};if(null!==document.body){document.body.insertBefore(a,null);for(var d in c)void 0!==a.style[d]&&(a.style[d]="translate3d(1px,1px,1px)",b=window.getComputedStyle(a).getPropertyValue(c[d]));return document.body.removeChild(a),void 0!==b&&b.length>0&&"none"!==b}return!1}();if(x)f(),v.on("click",function(){b()}),n.on("click",function(){b()});else{h.addClass("no-csstransforms3d"),g.hasClass(k)?g.css({left:"-"+q}):g.css({right:"-"+q}),i.css({"overflow-x":"hidden"});var y=!1;f(),v.on("click",function(){y?(e(),y=!1):(d(),y=!0)}),n.on("click",function(){y?(e(),y=!1):(d(),y=!0)})}}(jQuery); \ No newline at end of file +!function(a){function b(){g.hasClass(j)?h.toggleClass(k):h.toggleClass(l),n&&g.one("transitionend",function(){n.focus()})}function c(){g.hasClass(j)?h.removeClass(k):h.removeClass(l)}function d(){g.hasClass(j)?(h.addClass(k),g.animate({left:"0px"},o),x.animate({left:p},o),i.animate({left:p},o)):(h.addClass(l),g.animate({right:"0px"},o),x.animate({right:p},o),i.animate({right:p},o)),n&&n.focus()}function e(){g.hasClass(j)?(h.removeClass(k),g.animate({left:"-"+p},o),x.animate({left:"0px"},o),i.animate({left:"0px"},o)):(h.removeClass(l),g.animate({right:"-"+p},o),x.animate({right:"0px"},o),i.animate({right:"0px"},o))}function f(){a(q).addClass(s),a(q).on("click",function(b){var c=a(this);c.hasClass(s)?(c.siblings(q).addClass(s).removeClass(r),c.removeClass(s).addClass(r)):c.addClass(s).removeClass(r),b.stopPropagation()})}var g=a(".pushy"),h=a("body"),i=a(".push"),j="pushy-left",k="pushy-open-left",l="pushy-open-right",m=a(".site-overlay"),n=a(g.data("focus")),o=200,p=g.width()+"px",q=".pushy-submenu",r="pushy-submenu-open",s="pushy-submenu-closed";if(void 0!==g.data("menu-btn-class"))var t=g.data("menu-btn-class");else var t=".menu-btn";var u=a(t+", .pushy-link"),v=a(t),w="#container";void 0!==g.data("container-selector")&&(w=g.data("container-selector"));var x=a(w);a(document).keyup(function(a){27==a.keyCode&&(h.hasClass(k)||h.hasClass(l))&&(y?c():(e(),z=!1),v&&v.focus())});var y=function(){var a=document.createElement("p"),b=!1,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};if(null!==document.body){document.body.insertBefore(a,null);for(var d in c)void 0!==a.style[d]&&(a.style[d]="translate3d(1px,1px,1px)",b=window.getComputedStyle(a).getPropertyValue(c[d]));return document.body.removeChild(a),void 0!==b&&b.length>0&&"none"!==b}return!1}();if(y)f(),u.on("click",function(){b()}),m.on("click",function(){b()});else{h.addClass("no-csstransforms3d"),g.hasClass(j)?g.css({left:"-"+p}):g.css({right:"-"+p}),x.css({"overflow-x":"hidden"});var z=!1;f(),u.on("click",function(){z?(e(),z=!1):(d(),z=!0)}),m.on("click",function(){z?(e(),z=!1):(d(),z=!0)})}}(jQuery); \ No newline at end of file