From e3394217d9988a274b6010ccc5c7cf5f8ce417d8 Mon Sep 17 00:00:00 2001 From: 1bl4z3r <34515568+1bl4z3r@users.noreply.github.com> Date: Thu, 28 Mar 2024 20:23:13 +0530 Subject: [PATCH] Fix: Hide mobile menu on button click --- assets/js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/main.js b/assets/js/main.js index 3d98ef6..5668d0d 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -55,6 +55,7 @@ const toggleMobileMenu = () => { } else { mobileMenu.style.animationName = 'bounceOutRight'; mobileMenu.style.webkitAnimationName = 'bounceOutRight' + mobileMenu.style.display = 'none'; mobileMenuVisible = false; } } @@ -100,7 +101,7 @@ if (header !== null) { listen('#img-btn', "click", showImg); listen('.bg-img', "click", hideImg); - document.querySelectorAll('.post-year').forEach((ele)=> { + document.querySelectorAll('.post-year').forEach((ele) => { ele.addEventListener('click', () => { window.location.hash = '#' + ele.id; });