Skip to content

Instantly share code, notes, and snippets.

@dodozhang21
Created March 3, 2011 01:32
Show Gist options
  • Save dodozhang21/852146 to your computer and use it in GitHub Desktop.
Save dodozhang21/852146 to your computer and use it in GitHub Desktop.
deleteConfirmation - jQuery UI modal window init
// create the jQuery modal window and set autoOpen to false
$("#jQueryDeleteConfirmationModalWindow").dialog({
title: "Delete Confirmation",
autoOpen: false, // set this to false so we can manually open it
dialogClass: "jQueryDeleteConfirmationModalWindow",
closeOnEscape: false,
draggable: false,
width: 460,
height: 260,
modal: true,
buttons: {
"Yes, I'm sure": function() {
$( this ).dialog( "close" );
},
Cancel: function() {
$( this ).dialog( "close" );
}
},
resizable: false,
open: function() {
// scrollbar fix for IE
$('body').css('overflow','hidden');
},
close: function() {
// reset overflow
$('body').css('overflow','auto');
}
}); // end of dialog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment