Toggle interaction second click

Hi, I’m having a problem (actually two, but the second is less important) with possibly one of the most common interactions I can think of, and I can’t seem to figure out how to solve it.
1st problem:
I need to create an interaction that shows a second element when I click on it and hides it when I click on it again. so far so good.
My problem is that I have more than one element and I want to hide previous popups if they are open, so:
1st click on div1 > popup1 appears
1st click on div2 > popup2 appears and popup1 disappears

This I managed, the problem is that if I click again on div1, popup1 doesn’t appear (I guess because it still triggers the second click animation). How can I solve this?

2nd problem
I’ve noticed that once I trigger the animation once, the subsequent clicks do not show the fading effect, but only the hide/show.


Here is my public share link:
https://preview.webflow.com/preview/popuptest2ndclick?utm_medium=preview_link&utm_source=designer&utm_content=popuptest2ndclick&preview=cbdb46e2469c31ac45d9c8b911293451&workflow=preview