Hello - I’ve used the “Nav Element + Template” way to make a Mega Menu in Bricks, and it’s working really well, except that I’d like the dropdown menu to close once a link inside is clicked. It’s (obviously) quite large, and you can’t always see the new content being loaded behind it if it stays open after the link is clicked. This is particularly true when the links are for different anchors on the same page and are just scrolling around and not loading new pages.
See my work in progress site here: https://brown-spider-821637.hostingersite.com
The “Services” nav item has a working Mega Menu dropdown with links that are active for testing.
I’ve tried using AI to generate me some Javascript, but the problem seems to be that the menu is triggered on HOVER, and I’d like to close it on a (link)CLICK action. I don’t want to use the “click to show” option for the Mega Menu (which could fix the above), because we’ve seen a lot of users not clicking on nav items even when they have carats, and so they never see the dropdown content and links.
Any help appreciated.
Mac OS, Chrome and Safari.