Hey everyone…i was wondering if anyone can help me out with a navbar issue.
I’m having an issue where I’d like the nav-menu to close when using a nav link for an anchor on page.
I found 2 help threads in webflow forums but don’t seem to have any luck getting them to work.
[Thread 1]
Thread 2
Nav is only shown on mobile horizontal and portrait.
Any and all help on this is greatly appreciated!
Here is my public share link: [LINK][1]
Hi there,
The nav menu on mobile devices can be controlled through custom interactions and JavaScript. While the default behavior is toggle-based (open on first click, close on second), you can enhance this functionality by adding a custom interaction to automatically close the nav menu when anchor links are clicked.
To achieve this, you can add a click interaction to your anchor links that triggers the nav menu to close. This can be done through the Interactions panel by selecting your anchor links and adding a click trigger that affects the nav menu’s display state.
For more complex implementations, you can use custom code to ensure the nav menu closes whenever any anchor link is clicked, regardless of the default toggle behavior.
Hopefully this helps! If you still need assistance, please reply here so somebody from the community can help.