jQuery Replace delete copy


replace


$("Element").replaceWith("content")

Replace all matching elements with the specified HTML or DOM element.


$("Element").replaceAll("selector")

Replace all matching elements with the matched elements.


delete


$("Element").empty()

Deletes all child nodes in the matched set of elements. Including text also belongs to child nodes.


$("Element").remove("Expressions")

Removes all matching elements from the DOM.


copy


$("Element").clone()

Clone matching DOM elements and select a copy of these clones, is the meaning of replication.


$("Element").clone("true")

Element, and all its events, and selects a copy of those clones. For example, a button with an event, he will copy itself, the event can also be copied. Detailed explanation in the case.




Copyright 2014-2017 by DeveloperTut.com. All Rights Reserved.
TwitterGoogle+Facebook