Administrators Nathan Posted July 16, 2014 Administrators Posted July 16, 2014 I have a staic navigation bar.Right now "Home" is active. How can I adjust it so when I click "About" or "Team etc...then those nav options would become active?I know how to do it by checking the URL with PHP, but since these are not actual URL's but just jumping down to a div I'm not sure how to do it or best practice. Quote
Administrators Nathan Posted July 16, 2014 Author Administrators Posted July 16, 2014 Fixed by adding this js snippet right before the closing </body> tag. <script> $(function() { $(".navbar-nav li").click(function(){ $(".navbar-nav li").removeClass("active") $(this).addClass("active") }) }) </script> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.