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
Here's a potential solution for certain situations. The popup must have tabindex set for this to work and cannot have any "focusable" elements inside.
$('a').click(function() { $('.popup').show().focus(); }); $('.popup').blur(function() { $(this).hide(); });
http://jsfiddle.net/d6zw3/