How to toggle element on button click and close on outside click? – Shopify
I would like to toggle the visibility of some element when its associated button is clicked. Additionally, I'd like for the visible element to close when a click occurs anywhere outside of it. Any links inside the visible element should…