Filter and Hooks

add active class to the current menu using jquery

Sometimes, it is handy to use jQuery to highlight the current menu. And for such cases you can write script that automatically add active class to the current menu:

If the menu to be highlighted is inside the container with class for eg. ‘main-nav’, then it would be good to add ‘.main-nav’ on the selector.

Hits: 10

Standard