Closed d33pak-s1ngh closed 6 years ago
fixed the problem with the following code.
var windowURL = window.location.href;
pageURL = windowURL.substring(0, windowURL.lastIndexOf('/'));
var x= $('a[href="'+pageURL+'"]');
x.addClass('active');
x.parent().addClass('active');
var y= $('a[href="'+windowURL+'"]');
// y.addClass('active');
// y.parent().addClass('active');
y.parentsUntil("sidebar-menu").addClass('active'); //This part will add active class to all its parents
@d33pak-s1ngh : Thanks.
i have added the new version of adminLTE template where i have paste the latest dist folder into assets and removed the existing one. the problem i am getting is that the new template menu work bit diffrent so when i create a sub menu and click on it only the sub menu becomes active, the parent of that sub menu remains in active. that means i have to add active class to the parent. following is the menu strcture
because of the code in footer.php only sub menu becomes active not the main.
can you help with this one.