mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
11 lines
376 B
JavaScript
11 lines
376 B
JavaScript
|
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();
|
||
|
});
|