• Resolved rusty_compass

    (@rusty_compass)


    Hi
    I have seen this question brought up previously and I saw there was a code snippet to place in the plugin code? I’m not sure exactly where to put this to make it work?
    The code was
    if( window.outerWidth <= 1024 ) {
    document.querySelector( ‘.hfe-nav-menu__submenu-arrow’ ).addEventListener( ‘click’, function( event ) {
    document.querySelector( ‘.hfe-nav-menu__toggle’ ).click();
    });
    }

    Cheers

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter rusty_compass

    (@rusty_compass)

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

    (@brainstormteam)

    Hello @rusty_compass

    Please use the code in the child theme’s functions.php

    I hope that helps.

    Please let me know how it goes.

    Regards,
    Rahul.

    Thread Starter rusty_compass

    (@rusty_compass)

    Hi Rahul
    Thanks for that. I ended up placing the file in a js plugin and it closed the menu once a link was clicked on but the whole navigation menu was no longer available.
    The site is waitomocavesmuseum.nz
    Cheers
    Rusty

    Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @rusty_compass

    I checked the website link provided but did not experience the issue.

    While in order to investigate the issue further, we will need to take a closer look at your end. Please open a ticket from our Support Portal for quicker resolution.

    Looking forward to hearing from you!

    Regards,
    Rahul.

    Hi @rusty_compass,

    Can you check if the code snippet you shared is correct? I’m getting an error trying to use it.

    Could you share the source where you found the code snippet? I would greatly appreciate it.

    Thread Starter rusty_compass

    (@rusty_compass)

    Hi @jokubas2000k
    Yeah the code snippet was javacript not php. Once I loaded it as javascript it worked to close the menu. However the menu was no longer available.
    I found the snippet on this discussion from another user with the same problem.
    Rusty

    Hello @rusty_compass

    We have replied to you from the support portal.

    Please let us know if the code works or you will need further help.

    Regards,
    Rahul.

    Thread Starter rusty_compass

    (@rusty_compass)

    Hi @bsfrahul
    Sorry for the delay, I’ve only just now got a chance to load it up.
    Yes it works perfectly!

    Thank you so much!
    Rusty

    Hello @rusty_compass

    Glad it worked for you.

    Have a nice day!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Mobile Menu not closing on link click’ is closed to new replies.