Fix menu toggle

This commit is contained in:
Track3 2019-01-04 17:05:49 +08:00
parent 334d05e5a1
commit c3da1e0281
3 changed files with 3 additions and 3 deletions

View file

@ -90,7 +90,7 @@ if (header !== null) {
autoHideHeader();
if (mobileMenuVisible == true) {
mobileMenuToggle();
toggleMobileMenu();
}
}, 250));
}

View file

@ -6,4 +6,4 @@ mobileMenuVisible=false;}}
const showImg=()=>{document.querySelector('.bg-img').classList.add('show-bg-img');}
const hideImg=()=>{document.querySelector('.bg-img').classList.remove('show-bg-img');}
const toggleToc=()=>{document.getElementById('toc').classList.toggle('show-toc');}
if(header!==null){listen('#menu-btn',"click",toggleMobileMenu);listen('#toc-btn',"click",toggleToc);listen('#img-btn',"click",showImg);listen('.bg-img',"click",hideImg);window.addEventListener('scroll',throttle(()=>{autoHideHeader();if(mobileMenuVisible==true){mobileMenuToggle();}},250));}
if(header!==null){listen('#menu-btn',"click",toggleMobileMenu);listen('#toc-btn',"click",toggleToc);listen('#img-btn',"click",showImg);listen('.bg-img',"click",hideImg);window.addEventListener('scroll',throttle(()=>{autoHideHeader();if(mobileMenuVisible==true){toggleMobileMenu();}},250));}

View file

@ -1 +1 @@
{"Target":"js/main.min.2405236001a8a985219a76eff5aa74e776ad317c13a0afb1246e088843a91335.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-JAUjYAGoqYUhmnbv9ap053atMXwToK+xJG4IiEOpEzU="}}
{"Target":"js/main.min.8f39f24808e9d0a9b02da58c2d2838da859dc0b7bdfadbdb1883aae8b6adacfe.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-jznySAjp0KmwLaWMLSg42oWdwLe9+tvbGIOq6LatrP4="}}