jQuery DOM Attribute Manipulation Methods

Primary tabs

Tim Bottman's picture

The methods on these flashcards is used by jQuery to get and set DOM attributes of elements.

Bookmark to learn: Login to use bookmarks.

Bookmark to learn: Login to use bookmarks.

Add to collection ... add jQuery DOM Attribute 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.

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

.hasClass()

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

.html()

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

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

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

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

.val()

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