Possible Duplicate:
add css rule using jquery
I want to add a second class to a DIV dynamically. I have a variable that is doing this:
var headerDIV = $("<div>", { "class": "modal-header" }).appendTo($(this.dialog));
this code is inside a function, now I want to create a new variable that contains a css class and I want to add it only with a name like this:
var headerDIV = $("<div>", { "class": "modal-header " + 'customClass' }).appendTo($(this.dialog));
My customClass will be like this:
var customClass = { 'background-color': '#00609a', 'color': 'white' };
Is there a way to do this? Thank you