summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanxiaobei <nanxiaobei@gmail.com>2019-04-01 16:00:59 +0800
committernanxiaobei <nanxiaobei@gmail.com>2019-04-01 16:00:59 +0800
commit2ab2e30c27c6d4ab35ef94a38a2db8b0541536e5 (patch)
tree551d841d4f18153f72a3da420fb62c514eda0803
parente3053cee4fe9ebd1f909a40549972e1847b3db46 (diff)
Update js
-rw-r--r--layouts/partials/footer.html3
1 files changed, 1 insertions, 2 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index d9eb238..d650d40 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -17,13 +17,12 @@
document.querySelectorAll('pre code').forEach((block) => {
hljs.highlightBlock(block);
});
-
setMenuListener();
});
+
function setMenuListener() {
var menuToggle = document.querySelector('.menu-toggle');
var body = document.querySelector('body');
-
menuToggle.addEventListener('click', function() {
body.classList.toggle('no-scroll');
}, false);