Multiple clickable items on a page

Hey,

(Sorry if this is a noob question to be asking but I’m really new to all of this.)
A page on my site is going to have multiple parent elements with OnClick events that will execute the “show” function and reveal containers with attached elements. Though, I only want to allow one of these containers to be visible at any given time.
How do I go about setting it up that the “show” function on a container runs as normal, but if you click on a different parent element the previously (shown) container box reverts back to its “hidden” state?

FYI: This particular page will have a total of 20 parent elements, each with accompanying container boxes that are revealed with the OnClick event.

Any help will be appreciated!
I hope my query makes sense :smiley:
Thanks

https://www.wix.com/code/home/example/Hide-and-Show-Elements

Ah jees yeah the code was right there…
Thank you!