1// AdminLTe 3.0.x
2/** add active class and stay opened when selected */
3 var url = window.location;
4
5// for sidebar menu entirely but not cover treeview
6 $('ul.nav-sidebar a').filter(function() {
7 return this.href == url;
8 }).addClass('active');
9
10// for treeview
11 $('ul.nav-treeview a').filter(function() {
12 return this.href == url;
13 }).parentsUntil(".nav-sidebar > .nav-treeview").addClass('menu-open').prev('a').addClass('active');