Given css class:
.red {
color: rgb(255,0,0);
background-color: rgb(0, 255, 0);
}
I then add a div to the dom via:
$("<div></div>").addClass("red").hide().appendTo("body");
I can get single properties using:
$(".red").css("color");
Which returns rgb(255, 0, 0);
My question is how can I loop through the css class properties and return them all without directly using the property name?