Created
May 8, 2013 08:08
-
-
Save DaveGoosem/5538966 to your computer and use it in GitHub Desktop.
Manipulating the DOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment