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
I did something like the following. Hope it helps someone
$('body').click(function(e) { $('className').click(function(){ e.stopPropagation(); $(this).data('clicked', true); }) if(!$('.className').data('clicked')){ // do sth } else { // do sth else } $('.className').data('clicked', false);