Clone ():
Copy node, no event by default, if a parameter true is passed, the event that is bound in the element is copied while the node is being copied.
1 <Scripttype= "Text/javascript">2 $(function(){3 var$apple= $("ul li:eq (0)"). Clone ();4 $("ul"). Append ($apple);5 });6 </Script>
ReplaceWith ():
Replaces all matching elements with the specified HTML or DOM element.
1 <Scripttype= "Text/javascript">2 $(function(){3 $("ul Li"). each (function(){4 $( This). ReplaceWith ("<li title= '"+ $( This). attr ("title")+"' style= ' background-color: #f00; ' >"+$( This). Text ()+"</li>");5 });6 });7 </Script>
ReplaceAll ():
Replace all matching elements with HTML or DOM elements.
1 <Scripttype= "Text/javascript">2 $(function(){3 $("<li title= ' Apple ' >Apple</li>"). ReplaceAll ("ul li:eq (0)");4 });5 </Script>
Note: If you replace an event with an element that was previously bound, the event will disappear after the substitution and the event needs to be re-bound.
Wrap ():
Use tags to wrap the matching nodes together.
Wrapall ():
Use tags to package all the nodes that match.
Note: If there are other elements between multiple elements that are contained, the other elements are placed after the wrapping element.
Wrapinner ():
Use tags to wrap the child elements of the matching node.
JQuery DOM Operations-copy nodes, replace nodes, wrap nodes