Created
October 9, 2009 14:30
-
-
Save 1stvamp/206060 to your computer and use it in GitHub Desktop.
jQuery.UI modal dialog background-click-closing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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