• Resolved susanna96

    (@susanna961)


    Just installed Sydney and I made a onepage website.
    Evertything is ok in desktop version, but in mobile version the links to the anchors work, but the dropdown menu do no close.
    I tried to add this script (which worked with other websites), but now do not work:

    (function($) {
        if ( matchMedia( 'only screen and (max-width: 1024px)' ).matches ) {
            $('.menu li a').on('click', function(){
                $('#mainnav-mobi').removeClass('toggled');
            });
        }
    })(jQuery);

    Any help?
    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @susanna961,

    Thank you for reaching out to us.

    Where did you add that code from?
    Can you provide a link to your website for direct inspection?

    Regards,
    Kharis

    Thread Starter susanna96

    (@susanna961)

    Hi Kharis,

    This code I got it in a Sydney forum https://forums.athemes.com/t/the-menu-stays-open-when-i-click-the-link-mobile-view/42762/6 and it worked in another site.

    But it’s not working in this: https://biashara.co.mz/
    The dropdown do not close!
    Can you please help me?
    Thank you.

    Best regards
    Susanna

    Hi Susanna,

    Thank you for getting back along with request link and additional details.

    Please use this code to replace the old one:

    (function($) {
        'use strict';
    
        if ( matchMedia( 'only screen and (max-width: 1024px)' ).matches ) {
            $('.menu li a').on('click', function(){
                $('.sydney-offcanvas-menu').removeClass('toggled');
    
            });
        }
    
    })(jQuery);

    Clear any cache, reload page, and run your check.

    Let me know how it goes.

    Regards,
    Kharis

    Thread Starter susanna96

    (@susanna961)

    Thank you Kharis!

    You are simply great! It works perfectly now.
    Only does not work with the “CONTACTOS” which is a button link, but I can substitute with a normal menu item.

    Best regards
    Susanna

    You’re welcome Susanna!

    Can I request marking this topic as resolved?

    Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

    Regards,
    Kharis

    Thread Starter susanna96

    (@susanna961)

    Yes of course!
    Thank you again.
    I already gave top evaluation to your 5 stars support!
    Best regards
    susanna

    • This reply was modified 3 years, 1 month ago by susanna96.

    Thanks for the positive review and leaving it with lovely 5-stars. That’s much appreciated!

    Regards,
    Kharis

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘hamburger drop-menu not closing’ is closed to new replies.