Skip to content

Commit

Permalink
fixup! fixup! fixup! Revise the navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
cpeel committed Apr 5, 2024
1 parent 288edb0 commit 364624f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/navbar_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
// Toggle a menu contents to visible and rotate the menu icon
function toggleMenu(menuId) {
let menu = document.getElementById(menuId);
[menu.getElementsByClassName("menu-contents")].forEach(element => {
element[0].classList.toggle("invisible");
element[0].classList.toggle("transparent");
});
[menu.getElementsByClassName("menu-icon")].forEach(element => {
element[0].classList.toggle("rotate");
});
for (const element of menu.getElementsByClassName('menu-contents')) {
element.classList.toggle("invisible");
element.classList.toggle("transparent");
}
for (const element of menu.getElementsByClassName('menu-icon')) {
element.classList.toggle("rotate");
}
}

// Close all dropdown menus if the user clicks outside of one
Expand Down

0 comments on commit 364624f

Please sign in to comment.