I\'m trying to hide a div if the user clicks anywhere BUT the popup OR its children. This is the code I have so far:
$(\"body\").click(function(){ var $t
As of jQuery 1.7 there is the on() handler, the following works for me, assuming a visible popup contains the class '.activePopup' :
$('body').on('click', ":not(.activePopup)", function(e){ e.stopPropagation(); //do your hiding stuff });