How to select a range of elements in jQuery
<pre><code>&lt;div id="myDiv"&gt;
     &lt;a&gt;...&lt;/a&gt;
     &lt;a&gt;...&lt;/a&gt;
     &lt;a&gt;...&lt;/a&gt;
     &lt;a&gt;...&lt;/a&gt;
     &lt;a&gt;...&lt;/a&gt;
     &lt;a&gt;...&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>If you wanted to select the 2nd, 3rd and 4th <code>a</code> tags in the above example, how would you do that? The only thing I can think of is:</p>

<pre><code>$("#myDiv a:eq(1), #myDiv a:eq(2), #myDiv a:eq(3)")
</code></pre>

<p>But that doesn't look to be very efficient or pretty. I guess you could also select ALL the <code>a</code>s and then do run <code>.each</code> over them, but that could get very inefficient if there were a lot more <code>a</code>s.</p>
