• Resolved Michael

    (@bazzarello)


    Hello, how are you? First congratulations on the plugin. It’s working fine for me.

    I have a question regarding the menu. Nowadays it is common to add an anchor link in the menu that leads to a section of the page itself.

    Is there a way to close the menu when clicking on an item?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @bazzarello

    Thanks for getting in touch.

    Would you mind sharing an example link where we can see the requirement?

    Looking forward to hearing from you.

    Regards,
    Rahul.

    Thread Starter Michael

    (@bazzarello)

    Hello Rahul, thanks for the return.

    At the moment I removed the menu to test other things.

    But the question would be about the responsive menu (mobile).

    For example, suppose the menu has the following items:
    – contact (#contact)
    – services (#services)
    And that these items take to a section on the page itself (anchor link).

    On the PC it works well. But when you activate the responsive mode (when only the button to open the menu appears) by clicking on these links, the menu remains open, being above the content. The user would have to close the menu to see that the page went down to the section where it has the anchor link.

    Is there a way to click on the link to close this menu?

    Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @bazzarello,

    Kindly try using this below gist with the nav menu widget.
    https://gist.github.com/SuryawanshiPrajakta/70a4e5bb022e5efeff70af66e670e134

    Kindly let us know if this does not work for you.

    We look forward to helping you.

    Regards,
    Rahul.

    darondaron

    (@darondaron)

    Hi Team

    I have the very same problem with menu anchors in Elementor.
    The HF&B mobile nav menu will not close automatically when a link to an anchor is clicked.

    I did not understand what to do on this thread’s link to gisthub.
    I also saw these threads with same problem:
    https://www.ads-software.com/support/topic/close-mobile-hamburger-menu-on-click-outside/
    https://www.ads-software.com/support/topic/elementor-mobile-menu-not-collapsing-when-using-anchors-on-a-one-page-site/

    I only work frontend in elementor with minor css code.
    So any fixes outside of that is beyond my level.

    My question, will this be fixed in an update soon in this plugin?

    I have spent a looot of time making this work in general, but this one item is bugging.

    Thanks for a great plugin!

    Regards
    darondaron

    Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @darondaron

    Sorry for the delay in response.

    One of our colleagues has already replied to the query when it was opened at our support portal.

    The code in the gist will close the menu canvas when a link is clicked.

    Please let me know how it goes.

    Regards,
    Rahul

    Thread Starter Michael

    (@bazzarello)

    Hello, thanks for the feedback.

    I did the procedure indicated above but it didn’t work. As my case was a little urgent, I ended up using another plugin for the popup. But I leave here my thanks and a tip for the next update.

    Hi Michael

    May I ask what other header plugin you used that worked for you?
    BR
    daron

    Thread Starter Michael

    (@bazzarello)

    Hi @darondaron

    I used two plugins: “Popup Maker” and “Elementor – Header, Footer & Blocks Template”. But it is also a complicated process to make it work as we want. If you can’t make it work, anything sends me an email that explains the steps: [email protected]
    Note: You will need to edit your theme’s functions.php file.

    Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @bazzarello and @darondaron,

    The below code can be used to close the Hamburger when clicked on any of the link —

    if( window.outerWidth <= 1024 ) {
        document.querySelector( '.hfe-nav-menu__submenu-arrow' ).addEventListener( 'click', function( event ) {
        	document.querySelector( '.hfe-nav-menu__toggle' ).click();
        });
    }

    I hope this helps. Please let me know how can I help you further.

    Regards,
    Prajakta Suryawanshi

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Close menu after click’ is closed to new replies.