$ ("#top_cartWarp"). AppendTo ($ ("#top_main_right")). CSS (' position ', ' relative '). CSS (' top ', ' 0px '); return value: JQueryAppendTo(content)
V1.0Overview
Appends all matching elements to another specified set of element elements.
In fact, using this method reverses the normal $ (A). Append (b) operation, that is, instead of appending B to a, append a to B.
In jquery 1.3.2,appendTo, Prependto, InsertBefore, InsertAfter, and ReplaceAll have become a destructive operation, and the return value is all of the appended content, Rather than just the previously selected element. So, to select the previously selected element, you need to use the end () method, see example Ii.
Parameters
contentString
Content to be appended
Example Description:
Append all paragraphs to an element with an ID value of foo.
HTML Code:
<p>I would like to say: </p><div></div><div></div>
JQuery Code:
$("p").appendTo("div");
Results:
<div><p>I would like to say: </p></div><div><p>I would like to say: </p></div>
Describe:
New paragraph append div and add a class
HTML Code:
<div></div><div></div>
JQuery Code:
$("<p/>") .appendTo("div") .addClass("test") .end() .addClass("test2");
Results:
<div><p class="test test2"></p></div><div><p class="test"></p></div>
jquery appendto Usage