jquery .css() rule isnt getting applied
<p>I have this code,everything works fine but <code>.css('color','red')</code> rule is not getting applied.I tried different ways but could'nt find any.</p>

<pre><code>$('#menu li').each(function() {
$(this).hover(function() {
$(this).text().charAt(0).css('color','red');
});
});
</code></pre>

<p>But this code works fine.Cant figure what is wrong with above code.</p>

<pre><code>$('#menu li').each(function() {
$(this).hover(function() {
$(this).css('color','red');
});
});
</code></pre>

<p>Thank you for your responses.</p>
