-
-
Save quevon24/c44283c94ebca0d9a68057c68aabb661 to your computer and use it in GitHub Desktop.
Assign "active" class to navbar item based on current page URL with jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- your average Bootstrap navbar component, in this case placed in an include called header.html --> | |
<div class="navbar"> | |
<div class="navbar-inner"> | |
<ul class="nav"> | |
<li><a href="/">Home</a></li> | |
<li><a href="/about.php">About</a></li> | |
<li><a href="/contact.php">Contact</a></li> | |
</ul> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment