jQuery HTML / CSS Methods


Method Description
addClass() Adds one or more class names to the items you've chosen.
after() Inserts content after the pieces that have been chosen.
append() Inserts material at the end of the components you've chosen.
appendTo() Inserts HTML elements at the end of the elements you've chosen.
attr() Sets or returns the attributes/values of the items that have been chosen.
before() Content is inserted before the selected items.
clone() Makes a replica of the elements you've chosen.
css() Sets or returns one or more style attributes for the components specified.
detach() Removes chosen items while retaining data and events.
empty() All child nodes and content from the specified items are removed.
hasClass() Determines if any of the chosen items contain the supplied class name.
height() Sets or returns the height of the components chosen.
html() Sets or returns the content of the items that have been chosen.
innerHeight() Returns an element's height (including padding but not border).
innerWidth() The width of an element (including padding but not border) is returned.
insertAfter() Inserts HTML elements after the ones that have been chosen.
insertBefore() Inserts HTML elements before the ones that have been chosen.
offset() Sets or returns the offset coordinates (relative to the document) for chosen items.
offsetParent() The first positioned parent element is returned.
outerHeight() The height of an element (including padding and border) is returned.
outerWidth() The width of an element (including padding and border) is returned.
position() Returns an element's position (relative to the parent element).
prepend() Inserts material at the start of the selected components.
prependTo() Inserts HTML elements at the start of the specified elements.
prop() Sets or returns chosen items' properties/values.
remove() Removes the items you've chosen (including data and events).
removeAttr() Removes one or more qualities from the components you've chosen.
removeClass() Removes one or more classes from the items you've chosen.
removeProp() Removes a property that has been set using the prop() function.
replaceAll() Replaces the items that have been chosen with new HTML elements.
replaceWith() The selected items are replaced with fresh material.
scrollLeft() Sets or returns the horizontal scrollbar position of the components that have been chosen.
scrollTop() Sets or returns the vertical scrollbar position of the components that have been chosen.
text() Sets or returns the text content of the components that have been chosen.
toggleClass() Toggles the addition and removal of one or more classes from chosen items.
unwrap() Removes the chosen items' parent element.
val() The value attribute of the chosen elements (for form elements) is set or returned.
width() Sets or returns the width of the items chosen.
wrap() Wraps the specified HTML element(s) in HTML.
wrapAll() Wraps all chosen components in HTML element(s).
wrapInner() Wraps the content of each chosen element in HTML element(s).