You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
376 B
11 lines
376 B
function hideAllButCurrent(){
|
|
//by default all submenut items are hidden
|
|
$("nav > ul > li > ul li").hide();
|
|
|
|
//only current page (if it exists) should be opened
|
|
var file = window.location.pathname.split("/").pop();
|
|
$("nav > ul > li > a[href^='"+file+"']").parent().find("> ul li").show();
|
|
}
|
|
$( document ).ready(function() {
|
|
hideAllButCurrent();
|
|
}); |