JQuery对话框按钮Css
我有这样的代码:JQuery对话框按钮Css,jquery,jquery-ui,Jquery,Jquery Ui,我有这样的代码: $("#confirm").dialog({ modal: true, title: 'Confirm', resizable: false, draggable: false, autoOpen: false, height: 200, width: 5
$("#confirm").dialog({
modal: true,
title: 'Confirm',
resizable: false,
draggable: false,
autoOpen: false,
height: 200,
width: 550,
buttons: [{
tabIndex: -1,
text: 'Yes',
"class": 'informationLearnButton',
click: function () {
...
}
else {
}
$(this).dialog("close");
}
},
{
tabIndex: -1,
text: 'No',
'className': 'SomeOtherCssClass',
click: function () {
$(this).dialog("close");
}
}]
});
类对我不起作用,我尝试使用class,className加“”和不加“”。
JQuery版本是1.8.22。
现在要做什么下面是一个如何使用类的示例:
$("#dialog").dialog({
buttons: {
'Confirm': function() {
//do something
$(this).dialog('close');
},
'Cancel': function() {
$(this).dialog('close');
}
},
create:function () {
$(this).closest(".ui-dialog").find(".ui-button:first").addClass("custom");
}
});
使用
“类”
似乎很好,请参阅本文:-