【发布时间】:2013-10-21 21:31:09
【问题描述】:
我希望将类定义添加到使用button : { } 创建的元素中,而无需执行$('.ui-dialog-buttonpane button:eq(0)') 之类的操作。
$(function() {
$( "#dialog-confirm" ).dialog({
resizable: false,
height:140,
modal: true,
buttons: {
//add a class definition to the delete all items button here. tried
//class:'save' didn't work
"Delete all items": function() {
$( this ).dialog( "close" );
},
Cancel: function() {
$( this ).dialog( "close" );
}
}
});
});
【问题讨论】: