2017-07-06 62 views

回答

-1

添加这个JavaScript在您的页脚

*这个工程的adminlte工具栏菜单,也为工具栏菜单树状

/** add active class and stay opened when selected */ 
var url = window.location; 

// for sidebar menu entirely but not cover treeview 
$('ul.sidebar-menu a').filter(function() { 
    return this.href == url; 
}).parent().siblings().removeClass('active').end().addClass('active'); 

// for treeview 
$('ul.treeview-menu a').filter(function() { 
    return this.href == url; 
}).parentsUntil(".sidebar-menu > .treeview-menu").siblings().removeClass('active').end().addClass('active');