Click away listener
Listen for click events that occur somewhere in the document, outside of the element itself.
Simple menu
For instance, if you need to hide a menu when people click anywhere else on your page:
You can find a more advanced demo on the menu documentation section.