Archived topic
Main Navigation Dropdown
4 replies · Started by Anonymous on April 11, 2016
Is there a way to remove the dropdown 'delay' completely?
I usually manage to tune my menu's with:
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
Adding the '!important' doesnt even seem to work. Where is this little secret hidden =)
Greetings,
David
Hi there,
Adding this code into the wp_footer hook in GP Hooks should do the trick:
<script>
jQuery( window ).load( function() {
jQuery( '.sf-menu .menu-item-has-children' ).GenerateDropdownMenu.destroy();
jQuery( '.sf-menu .menu-item-has-children' ).GenerateDropdownMenu({
transition_speed: 0,
open_delay: 0,
close_delay: 0
});
});
</script>
Let me know :)
Your a hero, thank you so much.. spot on!
David
You're welcome! :)
Just a heads up that this jQuery function has been removed in GP 2.0 (being released this week).
The sub-menu uses CSS now, so it’s easier to adjust. Here’s an example: https://generatepress.com/forums/topic/disable-menu-animation-on-hover/#post-436051