• Hi there

    I need some help with getting the mobile menu to close automatically when a # anchor link is clicked.

    I’ve tried this script, but it does not work.

    <script>
    	jQuery(document).ready(function ($) {
    $('.kt-mobile-menu a').click(function(){
    var magnificPopup = $.magnificPopup.instance;
    magnificPopup.close(); 
    		});
    	});
    </script>

    It does indeed close the menu, but does not jump to the correct section. When I remove the script, section jumps are working correctly, but again the menu does not close.

    I’d appreciate any help with this, thanks so much!

Viewing 1 replies (of 1 total)
  • Hi there,

    Thank you for reaching out to us.

    Can you send us a link to your website? It will see us better understand what you are trying to achieve. Also, I’m confused about what you said that it closes the menu but does not jump to the correct section. Can you elaborate in detail? Maybe send us a screen recording of how you wanted the jQuery to function?

    I hope this helps and let us know how we could help you further.

    Kind Regards,
    Michael

Viewing 1 replies (of 1 total)
  • The topic ‘Mobile menu not closing when anchor link clicked’ is closed to new replies.