Click away listener
Detect if a click event happened outside of an element. It listens for clicks that occur somewhere in the document.
- 📦 1.4 kB gzipped.
Simple menu dropdown
For instance, if you need to hide a menu dropdown when people click anywhere else on your page:
You can find a more advanced demo on the menu documentation section.