[Resolved] Main Navigation Dropdown

Home Forums Support [Resolved] Main Navigation Dropdown

Home Forums Support Main Navigation Dropdown

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #185892
    David

    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

    #185943
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #185953
    David

    Your a hero, thank you so much.. spot on!

    David

    #185955
    Tom
    Lead Developer
    Lead Developer

    You’re welcome! 🙂

    #441853
    Tom
    Lead Developer
    Lead Developer

    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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.