I’m working on a website for a client, and my question is about adding an interaction in a header element. The header has 4 elements, and one of the elements is supposed to show a dropdown menu on click. On second click of course, the dropdown menu would disappear. But the problem I’m facing is that I need the dropdown to disappear after making the 2nd click anywhere and not just when I 2nd click on the very same element. A perfect example of what I’m looking for is the header on the webflow forums, when you click on “More” a dropdown comes up, and when you click anywhere else on the site, it disappears. Can anyone help me achieve this?
You can check my live site, I want the dropdown to appear when you click on “Get Started” in the header, and disappear when you click anywhere else. This is the exact representation of what I’m trying to do: https://gyazo.com/61b4995a3368f7ab13cdb629f0f28328
Thanks in advance!