jQuery(function($) {
var path = window.location.href;
$('nav a').each(function() {
if (this.href === path) {
$(this).addClass('is-active');
}
});
});
Last active
November 9, 2024 19:29
-
-
Save atelierbram/32ca83790bea83c81d9f7a5e9b904424 to your computer and use it in GitHub Desktop.
Set active class on menu-item link with jQuery
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment