X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=themes%2Fluci-theme-material%2Fhtdocs%2Fluci-static%2Fmaterial%2Fjs%2Fscript.js;h=a0f067595b5918dad8c1b3d202ac70e08f4dc38a;hb=8023fb9c433d01db99dc19668f892b4d4269eadb;hp=604c4da8a8860ab87ebe63f2aa101d6d5c52fdfe;hpb=5a0c3bbfa96ea7b4845402e1f776744a86df6cb7;p=project%2Fluci.git diff --git a/themes/luci-theme-material/htdocs/luci-static/material/js/script.js b/themes/luci-theme-material/htdocs/luci-static/material/js/script.js index 604c4da8a..a0f067595 100755 --- a/themes/luci-theme-material/htdocs/luci-static/material/js/script.js +++ b/themes/luci-theme-material/htdocs/luci-static/material/js/script.js @@ -201,9 +201,9 @@ if (!ul.is(":visible")) { menu.addClass("active"); ul.addClass("active"); - ul.stop(true).slideDown(); + ul.stop(true).slideDown("fast"); } else { - ul.slideUp(function () { + ul.stop(true).slideUp("fast", function () { menu.removeClass("active"); ul.removeClass("active"); }); @@ -274,16 +274,16 @@ var showSide = false; $(".showSide").click(function () { if (showSide){ - $(".darkMask").stop(true).fadeOut(); + $(".darkMask").stop(true).fadeOut("fast"); $(".main-left").stop(true).animate({ width: "0" - }); + },"fast"); showSide = false; }else{ - $(".darkMask").stop(true).fadeIn(); + $(".darkMask").stop(true).fadeIn("fast"); $(".main-left").stop(true).animate({ width: "15rem" - }); + },"fast"); showSide = true; } }); @@ -292,10 +292,10 @@ $(".darkMask").click(function () { if (showSide){ showSide = false; - $(".darkMask").stop(true).fadeOut(); + $(".darkMask").stop(true).fadeOut("fast"); $(".main-left").stop(true).animate({ width: "0" - }); + },"fast"); } }); @@ -342,4 +342,13 @@ break; } } + + + document.addEventListener("touchmove", function(evt){ + evt.preventDefault(); + }, false); + var container = document.getElementById("maincontent"); + container.addEventListener("touchmove", function(evt){ + evt.stopPropagation(); + }, false); })(jQuery);