hi,
is there a default option to close a jquery dialog by clicking somewhere on the screen instead of the close icon?
thx, fux
hi,
is there a default option to close a jquery dialog by clicking somewhere on the screen instead of the close icon?
thx, fux
When creating a JQuery Dialog window, JQuery inserts adds a ui-widget-overlay class. If you bind a click function to that class to close the dialog, it should provide the functionality you are looking for.
Code will be something like this (untested):
$('.ui-widget-overlay').click(function() { $("#dialog").dialog("close"); });
This post may help:
http://www.jensbits.com/2010/06/16/jquery-modal-dialog-close-on-overlay-click/