Highlight a Navigation Item of the current page using jQuery

jQuery to find url and add an “active” class to that navigation item.

The CSS to style the active class:

For Example:
If we had a Nav item like:

And we went to the About Page, we would see this:

Highlight a Parent Navigation item

What if you have an entire section that anytime you’re on that section the main nav is active?

Leave a Reply

Your email address will not be published. Required fields are marked *

4 + 6 =