how to add the three beginning a unique class?
<pre><code>&lt;ul class="topunm"&gt;
&lt;li&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;test&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>i want to add the number before the li. the following is my code:</p>

<pre><code>$("ul.code-topnumb &gt; li").each(function() {
    $(this).prepend('&lt;span class="num"&gt;' + ($(this).index() +1) + "&lt;/span&gt;");
})
</code></pre>

<p>but now, i want to add a background to only the first three number. how to change the code? thank you.</p>
