Maximum Call Stack Exceeded jQuery $.each()
<p>I am trying to implement a real-time search filtering function and am using $.each() in jQuery. Right now I'm just trying to loop through each element and print its text but am running into a maximum call stack exceeded issue. The list is about 50-60 items so I'm thinking size isn't an issue at all and perhaps I'm running into some infinite recursion although I don't think so. Below is my relevant HTML:</p>

<pre><code>&lt;div id="brands"&gt;
    &lt;ul id="left_brands"&gt;
        &lt;li&gt;&lt;a class="brand_check" href="javascript:void"&gt;Vineyard Vines&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a class="brand_check" href="javascript:void"&gt;Brooks Brothers&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a class="brand_check" href="javascript:void"&gt;Coast Apparel&lt;/a&gt;&lt;/li&gt;
        &lt;!-- etc. --&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>And here is the jQuery code that's giving me the error:</p>

<pre><code>$("#brand_filter input").keyup(function() {
    $.each("#brands li a", function() {
        alert($(this).text());
    });
});
</code></pre>

<p>Any suggestions are much appreciated.</p>
