<pclass="desc"><strong>Description: </strong>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</p>
<pclass="arguement"><strong>content</strong>An element, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</p>
<pclass="arguement"><strong>function(index, html)</strong>A function that returns an HTML string to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments.</p>
</li>
</ul>
<divclass="longdesc">
<p>The <code>.append()</code> and <code><ahref="/appendTo">.appendTo()</a></code> methods perform the same task. The major difference is in the syntax-specifically, in the placement of the content and target. With<code> .append()</code>, the selector expression preceding the method is the container into which the content is inserted. With <code>.appendTo()</code>, on the other hand, the content precedes the method, either as a selector expression or as markup created on the fly, and it is inserted into the target container.</p>
<p>Consider the following HTML:</p>
<pre><h2>Greetings</h2>
<div class="container">
<div class="inner">Hello</div>
<div class="inner">Goodbye</div>
</div>
</pre>
<p>We can create content and insert it into several elements at once:</p>