I created a tab of buttons using bootstrap .I made them dynamically by using a loop.
<ul class="nav nav-tabs" style="border-bottom:0px">
<li class="active">
<a data-toggle="tab" class="mybtn" id=' + mapport.selected_feature_layer[i] + '>' + layer_names[i] + '</a>
</li>
</ul>
And When I assign them an active class it worked for me .But after I assign them a class and call a function self.click($(this).attr('id')); the class active disappears and the design disappears of the class active.
Why this is happening ?
$(".mybtn").click(function(){
self.click($(this).attr('id'));
$('.active').removeClass('active')
$(this).addClass('active');
});
self.click($(this).attr('id'));include also in OP