Monday, 19 May 2014

Modifying multiple CSS properties in one go using jQuery

jQuery .css() method can be used to set one or more CSS properties for every matched element.

Setting single CSS property
 
$('p').css( "background-color", "yellow" );

 

Setting multiple CSS propertes
 
$('div.header').css({"background-color": "yellow","font-weight": "bold" });

 

Read More

jQuery API - .css() Method

www.w3schools.com >>jQuery - css() Method

No comments:

Post a Comment