问题描述
|
单击链接时如何调用/显示模态时出现问题。对如何进行这项工作有任何想法吗?
$(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;
});
});
解决方法
$(\'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;
});