Skip to content

Commit

Permalink
Adminmenu: Toggle for duplicate menus
Browse files Browse the repository at this point in the history
  • Loading branch information
richard67 committed Apr 18, 2024
1 parent 9c58004 commit 5c58018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/media_source/mod_menu/js/admin-menu.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ if (sidebar && !sidebar.getAttribute('data-hidden')) {
}));
};

mainNav.querySelectorAll('li.parent > a').forEach((parent) => {
document.querySelectorAll('ul.main-nav li.parent > a').forEach((parent) => {
parent.addEventListener('click', openToggle);
parent.addEventListener('keyup', openToggle);
});

// Menu close
mainNav.querySelectorAll('li.parent .close').forEach((subMenu) => {
document.querySelectorAll('ul.main-nav li.parent .close').forEach((subMenu) => {
subMenu.addEventListener('click', () => {
mainNav.querySelectorAll('.open').forEach((menuChild) => menuChild.classList.remove('open'));
mainNav.classList.remove('child-open');
Expand Down

0 comments on commit 5c58018

Please sign in to comment.