如当前点击的是管理员菜单展开并且是高亮显示,但是刷新后,怎么才能让当前默认展开并高亮当前菜单呢?

刷新后效果

$(function(){
$('.sidebar-menu li:not(.treeview) > a').on('click', function(){
var $parent = $(this).parent().addClass('active');
$parent.siblings('.treeview.active').find('> a').trigger('click');
$parent.siblings().removeClass('active').find('li').removeClass('active');
});
$(window).on('load', function(){
$('.sidebar-menu a').each(function(){
if(this.href === window.location.href){
$(this).parent().addClass('active')
.closest('.treeview-menu').addClass('.menu-open')
.closest('.treeview').addClass('active');
}
});
});
});
在 index.blade.php 的js 中加入这个
谢谢你的实现,加上你的代码这个功能正常达到我想要的效果了。还有一个效果不知道您实现没?
就是在sidebar-collapse 模式下,左侧点击的菜单栏鼠标离开后如何高亮显示?

正常模板提供是点击后,鼠标离开该菜单属于高亮显示的,效果如下:

@jaredwu
请问你这个主题是怎么修改的
@shencm
config配置下的app.php 修改 'skin' => 'skin-green',参数
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
你好,请问你是怎么实现‘当前点击的是管理员菜单展开并且是高亮显示’,方便把代码发一下吗?
In case of pagination it fails. Does anyone have any other solutions?
Most helpful comment
在 index.blade.php 的js 中加入这个