Quantcast
Channel: User Mohamed Mufeed - Stack Overflow
Viewing all articles
Browse latest Browse all 36

Answer by Mohamed Mufeed for Toggle active nav-link

$
0
0

For the first two .nav-item I see they are referring to different files. So in their curresponding files, you can mark them active.

For rest of the three .nav-item you can use (I am using JQuery since you mentioned it)

$('#nav-bar').on('click', '.nav-item', function(e) {    $('.nav-item.active', e.currentTarget).removeClass('active');    $(this).addClass('active');}

make sure the css for the .active is being applied correctly.


Viewing all articles
Browse latest Browse all 36

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>