DaveGoosem
5/8/2013 - 8:08 AM

Manipulating the DOM

Manipulating the DOM

//lets you add something in the DOM directly after the DOM element you target.
.append()

//lets you add something in the DOM directly before the DOM element you target.
.prepend()

.after()

//lets you place something in the DOM directly above, at the same level the item you target.
.before()

.appendTo()

.prependTo()

.insertAfter()

.insertBefore()

//removed targeted DOM element
.remove()

//finds the ancestor of the selected DOM element and only will affect that one.
.closest()

//find a particular DOM element
.find(<element>)