use full path for active menu detection
This commit is contained in:
parent
eaaea859d2
commit
92ce50e2d2
|
|
@ -883,11 +883,13 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
//automatically open the current path
|
||||
var path = window.location.pathname.split('/');
|
||||
path = path[path.length-1];
|
||||
let path = window.location.pathname;
|
||||
if (path !== undefined) {
|
||||
$("#sidebar-menu").find("a[href$='" + path + "']").addClass('sfActive');
|
||||
$("#sidebar-menu").find("a[href$='" + path + "']").parents().eq(3).superclick('show');
|
||||
let menuItem = $("#sidebar-menu").find("a[href$='" + path + "']");
|
||||
if (menuItem !== undefined) {
|
||||
menuItem.addClass('sfActive');
|
||||
menuItem.parents().eq(3).superclick('show');
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -883,11 +883,13 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
//automatically open the current path
|
||||
var path = window.location.pathname.split('/');
|
||||
path = path[path.length-1];
|
||||
let path = window.location.pathname;
|
||||
if (path !== undefined) {
|
||||
$("#sidebar-menu").find("a[href$='" + path + "']").addClass('sfActive');
|
||||
$("#sidebar-menu").find("a[href$='" + path + "']").parents().eq(3).superclick('show');
|
||||
let menuItem = $("#sidebar-menu").find("a[href$='" + path + "']");
|
||||
if (menuItem !== undefined) {
|
||||
menuItem.addClass('sfActive');
|
||||
menuItem.parents().eq(3).superclick('show');
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue