gpt4 book ai didi

javascript - AdminLTE 仪表板事件类删除

转载 作者:行者123 更新时间:2023-12-03 03:55:55 25 4
gpt4 key购买 nike

我正在使用 AdminLTE 仪表板。在侧边栏 TreeView 菜单中,单击菜单后删除事件类。

AdminLTE

最佳答案

将此 JavaScript 添加到页脚

*this works for adminlte sidebar menu and also for sidebar menu treeview

    /** 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');

关于javascript - AdminLTE 仪表板事件类删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44950774/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com