Created
April 12, 2013 22:41
-
-
Save daverogers/5375778 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> |
Good job...please how do I make each page of this code active
`
Thank you sir.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been looking for something like this FOR DAYS!! thank you from a rookie!