Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Drop Down Menu not getting hidden once clicked

  • Hi,

    Dropdown not getting hidden when we click on it and then move to other dropdowns. You can visit this video: https://dev.ruminatee.com/azad/wp-content/uploads/2025/10/Recording-21-2.mp4

    Website url: https://dev.ruminatee.com/azad/

    Please let me know how to fix this.

    Regards

  • Hi there,

    I can replicate the issue, it’s becuase when clicking on the parent menu item, GP adds the sfhover class to it to open the sub menu.

    Try adding this JS to a hook element, and set the hook name to wp_footer, set the location to entire site.

    <script>
    document.querySelectorAll('li.menu-item-has-children').forEach(function(el) {
        el.addEventListener('mouseleave', function() {
            el.classList.remove('sfHover');
        });
    });
    </script>

    Let me know if this helps!

  • Hi Ying,

    Thank you for the quick update. I have added the code snippet provided by you. This works partially.
    You can check and understand what i meant to say.
    Regards

  • In this case, remove the JS and add this CSS instead:

    .main-navigation:not(.toggled) ul li.sfHover:not(:hover)>ul {
        display: none;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.