diff options
author | Lutty Yang <lutty@wcan.in> | 2015-10-05 22:01:42 +0800 |
---|---|---|
committer | Lutty Yang <lutty@wcan.in> | 2015-10-05 22:01:42 +0800 |
commit | a5ae384c8fe80c8d5d92ee84b41552db24aa4f4a (patch) | |
tree | 7d8ac992ef82c118c569781ac231ac4cf8ff91d8 /themes/luci-theme-material/htdocs/luci-static/material/js | |
parent | 5a0c3bbfa96ea7b4845402e1f776744a86df6cb7 (diff) |
luci-theme-material: PR from version 0.2.6
PR from version 0.2.6
Signed-off-by: Lutty Yang <lutty@wcan.in>
Diffstat (limited to 'themes/luci-theme-material/htdocs/luci-static/material/js')
-rwxr-xr-x | themes/luci-theme-material/htdocs/luci-static/material/js/script.js | 25 |
1 files changed, 17 insertions, 8 deletions
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); |