function change_active(select_item){ $(‘.mail-navigation‘).find(‘li‘).each(function(){ $(this).removeClass("active"); }) select_item.parent().addClass("active"); }
传入的为 a标签中触发点击的点击事件的 $(this)
bootstrap页面sidebar
原文:https://www.cnblogs.com/huim/p/9601087.html