Listens for clicks outside of the specified element.
Useful for closing a small pop-up or expanded section when the user clicks outside the open element.
The element(s) to check for clicks outside of. Any null/undefined values are ignored.
The callback function to call when a click is detected outside of the element.
element
Controls whether the callback can be called or not.
callback
Listens for clicks outside of the specified element.
Useful for closing a small pop-up or expanded section when the user clicks outside the open element.