Inserting html string into a jquery object?
<p>I have the following structure:</p>

<pre><code>var $html = $("&lt;div id='a'&gt;&lt;div id='b'&gt;&lt;div id='c'&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;");
</code></pre>

<p>I want to insert the following into the $html structure under div <code>#c</code>:</p>

<pre><code>var html = "&lt;div id='d'&gt;&lt;div id='e'&gt;&lt;div id='f'&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;";
</code></pre>

<p>I tried the following:</p>

<pre><code>var $newHtml = $($html).find("#c").append(html);
</code></pre>

<p>I thought now the variable <code>$newHtml</code> would point to div <code>#a</code> and all its descending elements including the newly appended ones.</p>

<p>However, <code>$newHtml</code> only contains the <code>#c</code> div and decendants.</p>

<p>How do I get the <code>#a</code> object and its descendents?</p>

<p><strong>Update:</strong></p>

<p>To clarify:</p>

<p>I have the jquery object <code>$html</code> and a string <code>html</code>.</p>

<p>I want to insert the html string into one the innermost element of the <code>$html</code> structure.</p>

<p><code>both append &amp; html works for it. The problem is, $newHtml only holds the elements of #c. $html contains all, including inserted elements.</code></p>
