Streaming live at 10am (PST)

Dropdown menu on click Overlay

Hi, can anyone please help.

Im trying to make dropdown menu on click with dark overlay in back when menu is open.
Up to this stage it works just fine but if I click outside of dropdown it close menu but still keep overlay active.

https://www.zzpstart.nl/

this is script I have so far:
(function() { (".toggle-overlay").on(“click”, function(e) {
("#overlay").toggleClass("active"); }); (document).on(“click”, function(e) {
if ((e.target).is(".toggle-overlay") === false) { ("#overlay").removeClass(“active”);
}
});
});

Thanks!


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hi @freebgd - welcome to the Webflow community!

Can you share your read-only link? Here’s how to share that link.

You should be able to build this with Webflow’s interactions instead of custom code. Send over your read-only link, and I will take a look.

Thanks!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.