diff --git a/js/main.js b/js/main.js index d4c22ae..822c7a2 100644 --- a/js/main.js +++ b/js/main.js @@ -35,7 +35,7 @@ $(document).ready(function() { $(document).on('mouseup', 'body.js-menu_on', function() { $(this).removeClass('js-menu_on'); }); - $('#mainmenu').mouseup(function(e) { + $('#mainmenu:not(.hide-on-click)').mouseup(function(e) { e.stopPropagation(); }); diff --git a/js/main.min.js b/js/main.min.js index d0a4a13..13c8566 100644 --- a/js/main.min.js +++ b/js/main.min.js @@ -1 +1 @@ -var mainmenu="#mainmenu";$(document).ready(function(){function n(n){$(n).each(function(){var n=$(this).data("target");n==mainmenu?$(this).is(":visible")?$("body").addClass("js-menu"):$("body").removeClass("js-menu"):n&&($(this).is(":visible")?$(n).parent().addClass("js-menu_hide"):$(n).attr("style","").parent().removeClass("js-menu_hide js-menu_on"))})}var s;scrolled=0,$(window).scroll(function(){s&&(clearTimeout(s),s=null),s=setTimeout(scrollHandler,150)}),scrollHandler=function(){$(window).scrollTop()>10?$("#header").addClass("sticky"):($("#header").removeClass("sticky"),$("#mainmenu li").removeClass("active"))},$(document).on("mouseup","body.js-menu_on",function(){$(this).removeClass("js-menu_on")}),$("#mainmenu").mouseup(function(n){n.stopPropagation()}),n(".js-menu-btn"),$(window).resize(function(){n(".js-menu-btn"),$("body").removeClass("js-menu_on")}),$("body").on("mouseup",".js-menu-btn",function(n){var s=$(this).data("target");n.stopPropagation(),s==mainmenu?(console.log(s+$("body").attr("class")),$("body").toggleClass("js-menu_on")):s&&($(s).slideToggle(300),$(s).parent().toggleClass("js-menu_on"))}),$(".tabs").on("click"," dt:not(.on)",function(){$(this).addClass("on").siblings("dt").removeClass("on")})}); \ No newline at end of file +var mainmenu="#mainmenu";$(document).ready(function(){function n(n){$(n).each(function(){var n=$(this).data("target");n==mainmenu?$(this).is(":visible")?$("body").addClass("js-menu"):$("body").removeClass("js-menu"):n&&($(this).is(":visible")?$(n).parent().addClass("js-menu_hide"):$(n).attr("style","").parent().removeClass("js-menu_hide js-menu_on"))})}var s;scrolled=0,$(window).scroll(function(){s&&(clearTimeout(s),s=null),s=setTimeout(scrollHandler,150)}),scrollHandler=function(){$(window).scrollTop()>10?$("#header").addClass("sticky"):($("#header").removeClass("sticky"),$("#mainmenu li").removeClass("active"))},$(document).on("mouseup","body.js-menu_on",function(){$(this).removeClass("js-menu_on")}),$("#mainmenu:not(.hide-on-click)").mouseup(function(n){n.stopPropagation()}),n(".js-menu-btn"),$(window).resize(function(){n(".js-menu-btn"),$("body").removeClass("js-menu_on")}),$("body").on("mouseup",".js-menu-btn",function(n){var s=$(this).data("target");n.stopPropagation(),s==mainmenu?(console.log(s+$("body").attr("class")),$("body").toggleClass("js-menu_on")):s&&($(s).slideToggle(300),$(s).parent().toggleClass("js-menu_on"))}),$(".tabs").on("click"," dt:not(.on)",function(){$(this).addClass("on").siblings("dt").removeClass("on")})}); \ No newline at end of file