Skip to content
Alexey Kupriyanenko edited this page Nov 10, 2013 · 2 revisions

.attr(attributeName)

attributeName The name of the attribute to get.

Get the value of an attribute for the first element in the set of matched elements.

.attr(attributeName, value)

attributeName The name of the attribute to set.

value A value to set for the attribute.

Set one or more attributes for the set of matched elements.

.attr(attributes)

attributes An object of attribute-value pairs to set.

.val()

This method does not accept any arguments.

Get the current value of the first element in the set of matched elements.

.val(value)

Set the value of each element in the set of matched elements.

value A string of text corresponding to the value of each matched element to set as selected/checked.

.css(propertyName, value)

propertyName A CSS property name.

Set one CSS property for the set of matched elements.

.css(properties)

properties An object of property-value pairs to set.

Set CSS properties for the set of matched elements.