mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 14:26:16 +01:00
use full path for active menu detection
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user