jQuery CSS Methods

Last Updated:

jQuery CSS Methods

The following are the list of CSS methods available in jQuery.

MethodExplanation
addClass() Adds the specified class(es) to each element in the set of matched elements.
css() Gets or Sets the computed style properties for the first element in the set of matched elements.
hasClass() Determines whether any of the matched elements are assigned the given class.
height() Gets or Sets the height of the selected elements.
innerHeight() Gets the inner height of the FIRST matched element.
innerWidth() Gets the inner width of the FIRST matched element.
offset() Gets or Sets the offset coordinates for the selected elements, relative to the document.
outerHeight() Gets the outer height (including padding, border, and optionally margin) of the FIRST matched element.
outerWidth() Gets the outer width (including padding, border, and optionally margin) of the FIRST matched element.
position() Gets the position of the first matched element, relative to its parent element.
removeClass() Removes a single class, multiple classes, or all classes from each element in the set of matched elements.
toggleClass() Toggles between adding and removing one or more class names from the selected elements.
width() Gets or Sets the width of the selected elements.

Share this Page

Meet the Author