bootstrap菜单展开收起_菜单展开及收缩效果 bootstrap+jquery

  • Post author:
  • Post category:其他


//左侧菜单 Jquery slideUp/slideDown

var leftmenu = $(function() {

$(“.mymenu”).click(function() {var mymenu = $(this.parentElement);

$(“.treeview-menu”).slideUp(“slow”, function() {

$(“.active”).toggleClass(“active treeview”)//收起其他打开的菜单

$(“.glyphicon-menu-down”).toggleClass(“glyphicon-menu-down glyphicon-menu-left”);

});if ($(this.parentElement.lastElementChild).attr(“style”) == “display: none;” || $(this.parentElement.lastElementChild).attr(“style”) ==undefined) {

$(this.parentElement.lastElementChild).slideDown(“slow”, function() {//sidedown收起完成后的操作

mymenu.toggleClass(“active treeview”);//更新图标

$(this.parentElement.firstElementChild.lastElementChild).toggleClass(“glyphicon-menu-down glyphicon-menu-left”);

});

}

});//子菜单点击效果

$(“._menuitem”).click(function() {

$(“._menuitem”).removeClass(“active”);

$(this).toggleClass(“active”);

});

});//侧边菜单隐藏与展示

var adminrmax = $(function() {

$.AdminLTE={};

$.AdminLTE.options={//Add slimscroll to navbar menus

//This requires you to load the slimscroll plugin

//in every page before app.js

navbarMenuSlimscroll: true,

navbarMenuSlimscrollWidth:”3px”, //The width of the sc



版权声明:本文为weixin_32697149原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。