Skip to content

Commit

Permalink
Fix collapsing menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ar2rsawseen committed Mar 30, 2019
1 parent 73e2ce2 commit 0cb67bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static/scripts/collapse.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
function hideAllButCurrent(){
//by default all submenut items are hidden
document.querySelectorAll("nav > ul > li > ul li").style.display = "none";
document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) {
parent.style.display = "none";
});

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

0 comments on commit 0cb67bb

Please sign in to comment.