Skip to content
shtylman edited this page Dec 23, 2012 · 1 revision

Get and set css properties.

css(prop)

get the value for prop

var value = dom('#foobar').css('display');

css(prop, value)

set the value for prop to value

css(obj)

set several properties based on the key:value pairs of the object. This is equivalent to calling .css(key, value) for each key:value pair.

dom('<div>').css({
    color: 'blue',
    display: 'inline-block'
});

Clone this wiki locally