mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 00:50:29 +00:00
Adds active class to current nav-item
This commit is contained in:
parent
a126b9c8c2
commit
46da9b91e7
1 changed files with 9 additions and 1 deletions
|
@ -277,7 +277,15 @@ $(window).resize(function() {
|
|||
$('.sidebar').removeClass('d-none');
|
||||
$('.sidebar').removeClass('toggled');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
// Adds active class to current nav-item
|
||||
$(window).bind("load", function() {
|
||||
var url = window.location;
|
||||
$('ul.navbar-nav a').filter(function() {
|
||||
return this.href == url;
|
||||
}).parent().addClass('active');
|
||||
});
|
||||
|
||||
$(document)
|
||||
.ajaxSend(setCSRFTokenHeader)
|
||||
|
|
Loading…
Reference in a new issue