How To Activate Not Default Bootstrap Tab From Outer Page?
I have which have two links. First goes to page with default activated tab, and second link - to second tab. I alway get default tab activated. Here is my js code(opens tab #home
Solution 1:
I changed my link:
<ahref="/websites/4#profile"class="activate_tab">aaa</a>
and my JavaScript:
var activeTab = $('[href=' + location.hash + ']');
activeTab && activeTab.tab('show');
$('.activate_tab').click(function(e){
$('#myTab a[href="#profile"]').tab('show');
});
Post a Comment for "How To Activate Not Default Bootstrap Tab From Outer Page?"