Im after some advice on the use of jquery and bootstrap if anyone can assist.
I have the following HTML
<ul class="nav nav-pills nav-fill">
<li class="nav-item">
<a class="nav-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">Our Services</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">Our Venues</a>
</li>
</ul>
I then have the following jquery
$('ul.nav li a').click(function (e) {
$('ul.nav li.active').removeClass('active')
$(this).parent('li').addClass('active')
})
Now what i want to create is an active state when the nav-link is clicked and it to move to whatever tab is being selected, which this does but what it doesnt do is remove the active if you select a link to open and the select the same to close?
Could anyone assist with this please?