Skip to content

Commit

Permalink
Merge pull request #3277 from mineralsfree/ENT-11373
Browse files Browse the repository at this point in the history
ENT-11373: navigation tree collapse issue
  • Loading branch information
olehermanse authored May 27, 2024
2 parents 7dd1632 + 92068ae commit f4614fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion generator/_assets/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,12 @@ if (window.innerWidth > 1023) {
document.querySelectorAll('.mainMenu li.parent > i').forEach(function (element) {
element.onclick = function (event) {
event.stopImmediatePropagation();
element.closest('li.parent').classList.toggle('opened');
var parent = element.closest('li.parent');
parent.classList.toggle('opened');
var openedSubmenus = parent.querySelectorAll('.' +openedClass);
openedSubmenus.forEach((subMenu)=>{
subMenu.classList.remove(openedClass);
})
}
});
} else {
Expand Down

0 comments on commit f4614fd

Please sign in to comment.