jquery how can i collect matching elements?
<p>if any one give me a suggession to collect matching elements using each?</p>

<p>this is i tried:</p>

<pre><code>&lt;ul&gt;
&lt;li class='options'&gt;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li class='options'&gt;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li class='options'&gt;&lt;/li&gt;
&lt;li class='options'&gt;&lt;/li&gt;
&lt;/ul&gt;​

var x = $();

x = (function(){
$.each($('li.options','ul'), function(i,e){
    return e;
})
    })()

    console.log(x)//i am getting undefined.
</code></pre>

<p><a href="http://jsfiddle.net/scDhx/" rel="nofollow">here is the jsfiddle</a></p>

<p>how can i collect the matching elements?</p>
