The best way of selecting div
<p>I want to add to div#container a div inside another div and then get selector of the inner div. Which one is the better way to do this?</p>

<pre><code>$('#container').html("&lt;div&gt;&lt;div class='get'&gt;&lt;/div&gt;&lt;/div&gt;");
var div = $('#container').find('.get');
</code></pre>

<p>or</p>

<pre><code>var div = $('&lt;div&gt;&lt;/div&gt;');
$('#container').html(
    $('&lt;div&gt;&lt;/div&gt;').html(div)
);
</code></pre>
