I\'m toying with jQuery UI, and I like how this demo works: http://jqueryui.com/demos/dialog/#modal-message
However, when a dialog comes up, the only way to close it is
That should do the trick:
$(".ui-widget-overlay").click(function(){ $(".ui-dialog-titlebar-close").trigger('click'); });
Click on .ui-widget-overlay will trigger the click on the close button
.ui-widget-overlay
Cheers
G.