Skip to content

Commit 0cb67bb

Browse files
committed
Fix collapsing menu
1 parent 73e2ce2 commit 0cb67bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

static/scripts/collapse.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
function hideAllButCurrent(){
22
//by default all submenut items are hidden
3-
document.querySelectorAll("nav > ul > li > ul li").style.display = "none";
3+
document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) {
4+
parent.style.display = "none";
5+
});
46

57
//only current page (if it exists) should be opened
68
var file = window.location.pathname.split("/").pop();

0 commit comments

Comments
 (0)