Navigation collapsed menu does not close on link selection

Hi,

I have a collapsed navigation set up in my header. I have 3 links in the menu that link to an ID on the page and when you click them, sometimes you see the page move to the location in the background which is great but the menu does not close automatically. I have tried all different codes to paste into the global JS but none of them work. My site is: https://hadleylearningcommunity.org.uk

thanks.

Hi there,

Would you mind clarifying the issue? I checked your site but the behavior of the navigation is normal.

Hi Jade,

Apologies, its when you view is on a mobile / tablet and use the collapsed navigation icon.

Thanks

Hi King,

It seems this is a duplicate. I have answered it here:

This works perfect for the Off Canvas navigation element but is there an example code snippet for a dropdown navigation element to close when menu item is clicked?

Here’s the website for reference (in tablet and mobile view points mobile dropdown is there) http://nclued.staging.wpengine.com/

Thanks so much!

Hello There,

Thanks for updating this thread. I have checked your site and the off canvas navigation element closes as soon as I click the menu item It only does not work in the “Contact Us” menu item. After a closer look, it is not working because you have a duplicate section ID with “footer-contact”. please keep in mind that an element ID must be unique and there should not be any duplicates. To resolve this, please create only one section with an ID of “footer-contact”. Just create two rows and make this each row visible or hidden in different screen sizes.

Hope this helps.

Thanks RueNel. I will give that a go :slight_smile:

Great. Thank you.