26-解决方案
14.5.2 解决方案
在 init 之前扩展 $.ui.pluginname.defaults 覆盖插件默认值:
$.extend($.ui.dialog.defaults, {
height: 300,
width: 400,
draggable: false,
modal: true,
buttons: {
'OK': function(event, ui) {
$(this).dialog('close');
}
}
});
...
$('#msg').dialog();
...
$('#note').dialog();