How to detect a click outside an element?
- by Sergio del Amo
I have some html menus, which i show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus area.
Is something like this possible with jquery?
$("#menuscontainer").clickOutsideThisElement(function() {
// hide the menus
});