Reputation: 259
i have code like this:
$("#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 doesn't work for me i tried with class ,className with "" and without "" . JQuery version is 1.8.22. What to do now
Upvotes: 1
Views: 4527
Reputation: 13250
Here is a sample for you how to use class:
$("#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");
}
});
Upvotes: 2