1
0
Fork 0

Update js

This commit is contained in:
nanxiaobei 2019-04-01 16:00:59 +08:00
parent e3053cee4f
commit 2ab2e30c27

View file

@ -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);