how to call jquery modal
I have an issue with how to call/display my modal when a link is click. Any idea on how to make this work?
$(document).ready(function(){
$('#dialog').hide();
$('a.Temp').click(function(){
$('#dialog').dialog({
modal: true,
//autoOpen: false,
开发者_如何学C bgiframe: false,
closeOnEscape: false,
title: "Test",
width: 520,
height: 360,
open: function(event, ui) {
jQuery('.ui-dialog-titlebar-close').hide();
$('#dialog').dialog('option', 'position', 'center'); },
buttons: [
{
text: "Cancel",
click: function() { $(this).dialog("close"); }
},
{
text: "Save"
}],
draggable: false });
return false;
});
});
$('a.Temp').click(function(){
$('#dialog').dialog({
modal: true,
autoOpen: false,
bgiframe: false,
closeOnEscape: false,
title: "Test",
width: 520,
height: 360,
open: function(event, ui) {
jQuery('.ui-dialog-titlebar-close').hide();
$('#dialog').dialog('option', 'position', 'center'); },
buttons: [
{
text: "Cancel",
click: function() { $(this).dialog("close"); }
},
{
text: "Save"
}],
draggable: false });
return false;
});
精彩评论