Adding class to each item after third with jQuery
<p>I have a very simple HTML which is as follow:</p>

<pre><code>&lt;ul class="my_class"&gt;
&lt;li&gt;List&lt;/li&gt;
&lt;li&gt;List&lt;/li&gt;
&lt;li&gt;List&lt;/li&gt;
&lt;li&gt;List&lt;/li&gt;
&lt;li&gt;List&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>What I am trying to acheave is to add a class "fred" to every single <code>&lt;li&gt;</code> that is appending after 3rd <code>&lt;li&gt;</code>.</p>

<p>This small function is adding it to hhe first 3 items :</p>

<pre><code>$('ul.my_class li:lt(3)').addClass('fred');
</code></pre>

<p>Thank you all for your help in advance!</p>

<p>Dom</p>
