Umar Umar - 4 months ago 22
jQuery Question

How to remove duplicate active class from bootstrap tab <li> tag

I have used two menu's to display the tab-pane (bootstrap). But it creates duplicate active link for

<li>
tag.

Fiddle: http://jsfiddle.net/g2j9c/1/

there should have only one active class for
<li>
for last active link. Any way to fix this?

Answer

You can add a little part of JS, like this :

$('.nav a').click(function(){
    $('.nav li').removeClass('active');
});

DEMO : http://jsfiddle.net/g2j9c/2/