【发布时间】:2010-12-01 02:23:36
【问题描述】:
我想在 jquery 对话框的按钮上添加 css 类。
这是我的代码:
$(document).ready(function(){
$('#messageBox p').html('bla bla bla. Ok?');
$('#messageBox').dialog({
modal : true,
buttons: {
'Yes': function() {
doSomething();
$(this).dialog('close');
},
'No': function() {
doAnotherThing();
$(this).dialog('close');
}
}
});
});
例如,我想在“是”按钮上添加“.red”类。
我该怎么做?
谢谢!
【问题讨论】: