Tuesday
Jan112011
Applying CSS with jQuery
Tuesday, January 11, 2011 at 3:15PM Here is the correct way to apply multiple CSS rules with one call to the .CSS() wrapper method. Note the JavaScript-style syntax for the normally dashed properties (font-weight becomes fontWeight and font-style becomes fontStyle). I've broken the statement across multiple lines for readability.
$("Hi there!
")
.css({color: 'red', fontWeight: "bold", fontStyle: "italic"})
.insertAfter("#followMe");
Joe Paris | Comments Off |