I am trying to close the jQuery dialog when clicked anywhere outside the dialogue box
I have tried with this code:
$("#dialog").dialog({
modal: false,
autoOpen: false,
height: "auto",
width: "auto",
open: function() {
jQuery('.ui-widget-overlay').bind('click', function() {
jQuery('#dialog').dialog('close');
})
}
});
But it is not able to close the Jquery diaog when clicked anywhere outside the box
http://jsfiddle.net/ovog4njt/30/
I dont have any custom css as mentioned in the fiddle pointed by OP