[Resolved] Mobile Menu is still visible after Menu Item is clicked

Home Forums Support [Resolved] Mobile Menu is still visible after Menu Item is clicked

Home Forums Support Mobile Menu is still visible after Menu Item is clicked

  • This topic has 9 replies, 4 voices, and was last updated 6 years ago by Tom.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #282872
    David

    The mobile menu is sliding away after the user clicked the Menu Item. Any recommendations? Tom, I hope you are feeling better.

    Here is the URL:
    http://cmcwebdev.com/pounders/

    Cheers!

    #282877
    Leo
    Staff
    Customer Support

    Hi David,

    I’m assuming you want the mobile menu to close after click? If so this should help:
    https://generatepress.com/forums/topic/close-menu-on-mobile-after-clicking/#post-265481

    Let me know.

    #282964
    David

    Yes, that is correct, Leo. Mobile menu to close after click. I set the code in the wp_footer hook. It didn’t work on my end. Any recommendations?

    #283059
    Leo
    Staff
    Customer Support

    Make sure you wrap <script></script> around it as here: https://generatepress.com/forums/topic/responsive-menu-and-anchor-links/#post-273558

    Let me know.

    #283126
    David

    Thanks for posting that links. Read through and discover there is another set of code for the slide out menu. I failed to write mobile slideout menu.

    <script>
    jQuery( document ).ready( function( $ ) {
        var settings = {
            animation_duration: false,
            place: "left",
            animation_curve: false,
            body_slide: false,
            no_scroll: false,
        };
        $( '.slideout-navigation a' ).on( 'click', function( event ) {
            $('.slideout-navigation').sliiide( settings ).deactivate();
            $( '.menu-toggle.opened' ).removeClass( 'opened' );
            $( '.slideout-toggle.opened' ).removeClass( 'opened' );
            $( 'body, html' ).removeClass( 'slide-opened' );
            $( '.slideout-overlay' ).hide();
            $( '.slideout-toggle' ).removeClass( 'sfHover' );
            $( document ).off( 'touchmove' );
            $( 'body' ).off( 'touchmove touchstart', '.slideout-navigation' );
        });
    });
    </script>

    That did it. Thanks!

    Cheers!

    #283127
    Leo
    Staff
    Customer Support

    Glad you got it working!

    #283164
    Tom
    Lead Developer
    Lead Developer

    This seems to be something that’s being requested more and more, might be worth adding by default.

    #283337
    David

    I would agree to add. Several people tested the site. They all expected the menu to slide away on click.

    Thanks! Coffee infusion time coming up.

    #549352
    George

    I have the same problem. I use elementor 2.0.5 and elementor pro 1.15.6. My URL is https://skladpodnaem.com/.

    I tried to fix the problem myself but didn’t work. Please tell me how to fix problem step by step. I tried to put some code from the forum without any success.

    #549671
    Tom
    Lead Developer
    Lead Developer

    You’re using the Elementor menu, so you would have to ask them how to do it with their code.

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