jQuery DOM Manipulation Methods

Primary tabs

Tim Bottman's picture

All of the jQuery methods in these flashcards manipulate the DOM in some manner.

Bookmark to learn: Login to use bookmarks.

Statistics

'Repetition is the mother of all learning.'

Bookmark to learn: Login to use bookmarks.

Add to collection ... add jQuery DOM Manipulation Methods to your collections:

Help using Flashcards ...just like in real life ;)

  1. Look at the card, do you know this one? Click to flip the card and check yourself.
  2. Mark card Right or Wrong, this card will be removed from the deck and your score kept.
  3. At any point you can Shuffle, Reveal cards and more via Deck controls.
  4. Continue to reveal the wrong cards until you have correctly answered the entire deck. Good job!
  5. Via the Actions button you can Shuffle, Unshuffle, Flip all Cards, Reset score, etc.
  6. Come back soon, we'll keep your score.
    “Repetition is the mother of all learning.”
  7. Signed in users can Create, Edit, Import, Export decks and more!.

Bookmark to learn: Login to use bookmarks.

Share via these services ...

Email this deck:

Right: #
Wrong: #
# Right & # Wrong of #

.addClass()

Adds the specified class(es) to each element in the set of matched elements.

.after()

Insert content, specified by the parameter, after each element in the set of matched elements.

.append()

Insert content, specified by the parameter, to the end of each element in the set of matched elements.

.appendTo()

Insert every element in the set of matched elements to the end of the target.

.attr()

Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.

.before()

Insert content, specified by the parameter, before each element in the set of matched elements.

.clone()

Create a deep copy of the set of matched elements.

.css()

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

.detach()

Remove the set of matched elements from the DOM.

.empty()

Remove all child nodes of the set of matched elements from the DOM.

.hasClass()

Determine whether any of the matched elements are assigned the given class.

.height()

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

.html()

Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.

.innerHeight()

Get the current computed inner height (including padding but not border) for the first element in the set of matched elements or set the inner height of every matched element.

.innerWidth()

Get the current computed inner width (including padding but not border) for the first element in the set of matched elements or set the inner width of every matched element.

.insertAfter()

Insert every element in the set of matched elements after the target.

.insertBefore()

Insert every element in the set of matched elements before the target.

.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 a number 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.

.prepend()

Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.

.prependTo()

Insert every element in the set of matched elements to the beginning of the target.

.prop()

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

.remove()

Remove the set of matched elements from the DOM.

.removeAttr()

Remove an attribute from each element in the set of matched elements.

.removeClass()

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

.removeProp()

Remove a property for the set of matched elements.

.replaceAll()

Replace each target element with the set of matched elements.

.replaceWith()

Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.

.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.

.text()

Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.

.toggleClass()

Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the state argument.

.unwrap()

Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.

.val()

Get the current value of the first element in the set of matched elements or set the value of 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.

.wrap()

Wrap an HTML structure around each element in the set of matched elements.

.wrapAll()

Wrap an HTML structure around all elements in the set of matched elements.

.wrapInner()

Wrap an HTML structure around the content of each element in the set of matched elements.