我在点击链接时如何调用/显示模态时遇到问题。关于如何使这项工作的任何想法?
$(document).ready(function(){
$('#dialog').hide();
$('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;
});
});
答案 0 :(得分:0)
$('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;
});