jquery selectors - selecting by the order number
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/185966/how-to-select-a-range-of-elements-in-jquery">How to select a range of elements in jQuery.</a>  </p>
</blockquote>



<p>How do I select paragraph by there's order?</p>

<p>e.g first 4 I can select by </p>

<pre><code>('#main p:lt(4)');
</code></pre>

<p>but how can I select paragraph from 5 to 8, from 8 to 12 etc.. ?</p>

<p>HTML</p>

<pre><code>&lt;div class="main"&gt;
    &lt;p&gt;text1&lt;/p&gt;
    &lt;p&gt;text2&lt;/p&gt;
    &lt;p&gt;text3&lt;/p&gt;
    &lt;p&gt;text4&lt;/p&gt;
    &lt;p&gt;text5&lt;/p&gt;
    &lt;p&gt;text6&lt;/p&gt;
    &lt;p&gt;text7&lt;/p&gt;
    &lt;p&gt;text8&lt;/p&gt;
    &lt;p&gt;text9&lt;/p&gt;
    &lt;p&gt;text10&lt;/p&gt;
    &lt;p&gt;text11&lt;/p&gt;
    &lt;p&gt;text12&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>Any help much appreciated. </p>

<p>Pete</p>
