In jQuery, cannot use a hover function into an each function?
<p>This is probably an easy question, but since I'm new to jQuery, I need someone to look at this code for me. So basically I want to change the css of the hover state of multiple anchor tags, I tried the following code but it didn't work. What's wrong with that?</p>

<pre><code>(".p-container a").each(function () {
    $(this).css({'text-shadow':'0 0 0.2px '+ colorArray[i]});
    $(this).hover(function() {
           $(this).css({'text-shadow':'0 0 2px '+ colorArray[i]});
    },function() {
           $(this).css({'text-shadow':'0 0 0.2px '+ colorArray[i]});
    });
    i++;
});
</code></pre>

<p>The code works without having the hover function, but I want to change the css of the hover state at the same time. Is anybody know how to do that? </p>

<p>Thanks
KJ</p>
