Skip to content

Instantly share code, notes, and snippets.

@FinalDestiny
Created December 21, 2017 11:48
Show Gist options
  • Save FinalDestiny/f21610a5c6d0f6bb67b69487ec6d39c7 to your computer and use it in GitHub Desktop.
Save FinalDestiny/f21610a5c6d0f6bb67b69487ec6d39c7 to your computer and use it in GitHub Desktop.
$( '.et_pb_fullscreen_nav_container' ).on( 'click', 'li.menu-item-has-children > a', function() {
var $this_parent = $( this ).closest( 'li' ),
$this_arrow = $this_parent.find( '>a .et_mobile_menu_arrow' ),
$closest_submenu = $this_parent.find( '>ul' ),
is_opened_submenu = $this_arrow.hasClass( 'et_pb_submenu_opened' ),
sub_menu_max_height;
$this_arrow.toggleClass( 'et_pb_submenu_opened' );
if ( is_opened_submenu ) {
$closest_submenu.removeClass( 'et_pb_slide_dropdown_opened' );
$closest_submenu.slideToggle( 700, 'easeInOutCubic' );
} else {
$closest_submenu.slideToggle( 700, 'easeInOutCubic' );
$closest_submenu.addClass( 'et_pb_slide_dropdown_opened' );
}
return false;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment