我想在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');
}
}
});
});
Run Code Online (Sandbox Code Playgroud)
例如,我想在"是"按钮上添加".red"类.
我怎样才能做到这一点?
谢谢!