find() not working
<p>I'm creating a bunch of <code>li</code> elements dynamically </p>

<pre><code>$.each(data.attributes.listingImages, function (i, obj){
if(i == 1){
   $('#js-carousel-menu').append('&lt;li media class="active"&gt;&lt;a media-frame&gt;&lt;img class="js-carousel-item" src=" '+obj.thumbnail+ ' " /&gt;&lt;/a&gt;&lt;/li&gt;' );
 }else{
   $('#js-carousel-menu').append('&lt;li media&gt;&lt;a media-frame&gt;&lt;img class="js-carousel-item" src=" '+obj.thumbnail+ ' " /&gt;&lt;/a&gt;&lt;/li&gt;' );
}
</code></pre>

<p>then when i try search for the 'active' <code>li</code> its not finding it</p>

<pre><code>$gallery = $(this.el).find('#js-carousel-menu');
var _this = $gallery.find('li.active');
</code></pre>

<p>however if i trace out <code>$gallery</code> it give me :</p>

<pre><code>&lt;ul&gt;
 &lt;li media&gt;...&lt;/li&gt;
 &lt;li media class="active"&gt;...&lt;/li&gt;
 &lt;li media&gt;...&lt;/li&gt;
 ...
 &lt;li media&gt;...&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>am i missing something? thanks </p>
