I have a menu in jQuery, when you click on the link that it opens, but I want it to be, when you click somewhere else, anywhere, and not in the menu, it becomes hidden.
I am currently binding the click event to
$(':not(#the_menu)')
But it looks like I'm attaching a click event to everything minus the menu, is there a more efficient way to do something like this?
source
share