Reputation: 3945
I'm using this code, and I want to change the color of each button inline, because i'm using custom classes for dialog, buttons etc. and I don't want to touch them.
$(function() {
$colorDialog = $("#dialog").dialog({
dialogClass: 'customDialogClass',
autoOpen: false,
buttons: [
{
TODO: change color
click: function() {
$(this).dialog("close");
processResult("color");
}
}
]
});
});
Upvotes: 0
Views: 385
Reputation: 4616
You can change the css via jquery too.
click: function() {
$(this).css('background-color', '#FF0000');
$(this).dialog("close");
processResult("color");
}
(I am assuming, that you want to change the color of the button that was clicked.)
Upvotes: 1