Revision #5 has been created by emrald on Oct 7, 2016, 3:36:28 PM with the memo:
changed var hrefAttr = "a[href=\'"+dash_localVar+"\']";
« previous (#4)
Changes
Title
unchanged
How to make bootstrap tabs remain active/selected after navigating to different web pages.
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
bootstrap3, tabs, active tabs
Content
changed
[...]
if(dash_localVar){
$(".dashboard_tabs_cl > li").removeClass("active");
$(".tab-content > div").removeClass("active");
var hrefAttr = "a[href=\'"+dash_localVar+"
\']";
if( $(hrefAttr).parent() ){
$(hrefAttr).parent().addClass("active");
$(""+dash_localVar+"").addClass("active");
}[...]