Skip to content

Commit

Permalink
Remove regressed nav
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrythall committed Apr 9, 2024
1 parent d600ad8 commit 12af99d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,3 @@ navMenuTriggers.forEach(trigger => {
}
});
});

document.addEventListener('click', (event) => {
// Check if the click was outside the navMenu and if the navMenu is currently visible
if (!navMenu.contains(event.target) && navMenu.classList.contains('flex')) {
navMenu.classList.replace('flex', 'hidden');

// Close all submenus
const submenus = navMenu.querySelectorAll('ul');
submenus.forEach(submenu => {
if (submenu.classList.contains('flex')) {
submenu.classList.replace('flex', 'hidden');
}
});
}
});

0 comments on commit 12af99d

Please sign in to comment.