JQuery DOM Modification

Action Effect
insertBefore(selector) Adds the new element, composed of typically of the html in the initial selector as the previous sibling of the element(s) selected by the selector parameter
insertAfter(selector) Adds the new element, composed of typically of the html in the initial selector as the next sibling of the element(s) selected by the selector parameter
prependTo(selector) Inserts the new element, composed of typically of the html in the initial selector as the first child of the element(s) selected by the selector parameter
appendTo(selector) Adds the new element, composed of typically of the html in the initial selector as the last child of the element(s) selected by the selector parameter
text(string) Replace the innerHTML of the selected elements with the html escaped contents of string
html(string) Replace the innerHTML of the selected elements with the contents of string
remove() Remove the selected elements completely

Leave a Reply