How can I get the next (x) number of children/siblings of a particular element in jQuery?
<p>This is just an illustrative example, but say I had a list of divs containing elements:</p>

<pre><code>&lt;div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>My aim is to run a loop that goes through each div, gets the first 2 children and applies a particular CSS class to them.</p>

<p>How would I go about achieving this?</p>

<p><em>Note that this might not necessarily be two elements, at a later date it may become the first ten elements (or more).</em></p>
