Friday, July 28, 2017

How to Set Multiple CSS Properties/

Set Multiple CSS Properties

To set multiple CSS properties, use the following syntax:
css({"propertyname":"value","propertyname":"value",...});
The following example will set a background-color and a font-size for ALL matched elements:

Example

$("p").css({"background-color": "yellow", "font-size": "200%"});