Fix: Hide mobile menu on button click

This commit is contained in:
Antonio Sanchez
2024-03-24 09:23:04 +01:00
parent ae9a2fa59d
commit e259345c31

View File

@ -55,6 +55,7 @@ const toggleMobileMenu = () => {
} else { } else {
mobileMenu.style.animationName = 'bounceOutRight'; mobileMenu.style.animationName = 'bounceOutRight';
mobileMenu.style.webkitAnimationName = 'bounceOutRight' mobileMenu.style.webkitAnimationName = 'bounceOutRight'
mobileMenu.style.display = 'none';
mobileMenuVisible = false; mobileMenuVisible = false;
} }
} }
@ -100,7 +101,7 @@ if (header !== null) {
listen('#img-btn', "click", showImg); listen('#img-btn', "click", showImg);
listen('.bg-img', "click", hideImg); listen('.bg-img', "click", hideImg);
document.querySelectorAll('.post-year').forEach((ele)=> { document.querySelectorAll('.post-year').forEach((ele) => {
ele.addEventListener('click', () => { ele.addEventListener('click', () => {
window.location.hash = '#' + ele.id; window.location.hash = '#' + ele.id;
}); });