Style Properties

jQuery

Category: Style Properties


These methods get and set CSS-related properties of elements.

.css()

Get the value of a style property for the first element in the set of matched elements or set one or more CSS properties for every matched element.

.height()

Get the current computed height for the first element in the set of matched elements or set the height of every matched element.

.innerHeight()

Get the current computed height for the first element in the set of matched elements, including padding but not border.

.innerWidth()

Get the current computed width for the first element in the set of matched elements, including padding but not border.

.offset()

Get the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to the document.

.outerHeight()

Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without “px”) representation of the value or null if called on an empty set of elements.

.outerWidth()

Get the current computed width for the first element in the set of matched elements, including padding and border.

.position()

Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.

.scrollLeft()

Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.

.scrollTop()

Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.

.width()

Get the current computed width for the first element in the set of matched elements or set the width of every matched element.