34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
How to make bootstrap tabs remain active/selected after navigating to different web pages.
Comparing
#4
with
#5
Revision #5 was created by
emrald
on Oct 7, 2016, 3:36:28 PM.
changed var hrefAttr = "a[href=\'"+dash_localVar+"\']";
« Previous (#4)
Content
[...]
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");
}
[...]