How to detect a click outside an element?
<p>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.</p>

<p>Is something like this possible with jQuery?</p>

<pre><code>$("#menuscontainer").clickOutsideThisElement(function() {
    // hide the menus
});
</code></pre>
