I am using dialog box, which I am closing when a user click anywhere on page expect that dialog box.
Here is my code:
$(\'body\').on(\'click\',\'.ui-
$( ".close" ).bind( "click", function(e) { $('#popup1').hide(); e.stopPropagation(); });
jquery-1.7 jqueryui/1.8.2 perfect.
or your overlay
$( ".YOUR OVERLAY" ).bind( "click", function(e) { $('#YOUR POPUP').hide(); e.stopPropagation(); });