1, append (CONTENT|FN):
Give all P plus $ ("P"). Append ("<b>Hello</b>");
2. AppendTo (content): Appends all matching elements to another specified set of element elements.
<div></div><div></div> $ ("<p/>"). appendTo ("div") . AddClass ("test")// Returns the appended element . End ()//returns the first element . addclass ("Test2"); <div><p class= "Test" ></p></div>< Div><p class= "Test Test2" ></p></div>
AppendTo, Prependto, InsertBefore, InsertAfter, and ReplaceAll these methods become a destructive operation, and the return value is all of the appended content, not just the previously selected element. So, to select previously selected elements, you need to use the end () method
3. Prepend (CONTENT|FN): front content to each matched element
If an existing element is inserted, the existing element is deleted?
jquery document Processing