jquery.min.js:4 Uncaught Error: cannot call methods on dialog prior to initialization; attempted to

来源:互联网 发布:ug加工编程实例 编辑:程序博客网 时间:2024/05/29 12:40

错误提示:

jquery.min.js:4 Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'open'


之前代码

$( "#dialog-modal" ).dialog( "open" );


根据http://api.jqueryui.com/dialog/#option-buttons提示修改为

$( "#dialog-modal" ).dialog({
 buttons: [
{
 text: "Ok",
icons: {
primary: "ui-icon-heart"
},
click: function() {
$( this ).dialog( "open" );
 }


}
  ]
});


0 0
原创粉丝点击