Started

Selectors

Utilities

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$css.set

Set a map of style for element.
$css.set( element, properties )
  1. element [object]
    The target element.
  2. propertyName [string/object]
    The CSS property name or the object contained names and values.

Notes

This function is useful for setting a map of CSS property for one element.

Example

HTML code
<div id="box">This is a box</div>
<button onclick="start_css_set()">Set style</button>
CSS code
#box {
	width: 200px;
	height: 60px;
	font-size: 12px;
	background: #5599bb;
	padding: 10px;
}
JavaScript code
function start_css_set()
{
	$css.set($("box"), "width", "400px");

	$css.set($("box"), {
		"background-color": "#ccc",
		"font-size": "24px",
		"border": "1px solid #333"
	});
}
Demonstration
This is a box