Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save 1stvamp/206060 to your computer and use it in GitHub Desktop.
Save 1stvamp/206060 to your computer and use it in GitHub Desktop.
jQuery.UI modal dialog background-click-closing
/*
Close a jQuery.UI modal dialog when the background overlay is clicked on,
ala most standard modal javascript overlays.
*/
$('.ui-widget-overlay').click(function() {
// Where #dialog below should be a selector for the dialog you want to close
$('#dialog').dialog('close');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment