Skip to content

Instantly share code, notes, and snippets.

@kaskad88
Created June 14, 2019 08:05
Show Gist options
  • Save kaskad88/3429348046116f88a892ae762c4e95d7 to your computer and use it in GitHub Desktop.
Save kaskad88/3429348046116f88a892ae762c4e95d7 to your computer and use it in GitHub Desktop.
Add an active class for a top-level menu item
(function($) {
$( '.jet-sub-mega-menu .current-menu-item' ).each( function() {
var $this = $( this );
$this.closest( '.jet-mega-menu-item' ).addClass( 'jet-current-menu-item' );
} );
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment