147
rated 0 times
[
148]
[
1]
/ answers: 1 / hits: 61399
/ 9 Years ago, tue, september 1, 2015, 12:00:00
I want to change the active bootstrap tab on the click of another button.
I have tried add id's to the tabs li and write custom jquery code.
$('#emailNotify').click(function () {
$('#notify').addClass('active').attr('aria-expanded','true');
$('#myacc').removeClass('active').attr('aria-expanded','false');
});
This code works fine on first click but it doesn't change back when I tried to click My Account tab again.
Markup:
<ul class=content-list museo_sans500>
<li><a href=javascript:void(0)>Change Password</a></li>
<li><a id=emailNotify data-toggle=tab>Change Email Notifications</a></li>
<li><a href=javascript:void(0)>Change Profile Picture</a></li>
</ul>
More From » jquery