jquery: odd/even row elements + hover
<p>i'm styling a table with this command:</p>

<pre><code>$("tr").filter(":odd").addClass("odd");
</code></pre>

<p>works nice. now i'm having a hover function which would show a cursor when i move the cursor over a row.</p>

<p>the problem: on hover-out i want the table row getting back its "odd" class again, in order to keep the 2-colored layout. unfortunately it doesnt work - hovering-out will result in a plain class.</p>

<p>here's my hovering-code:</p>

<pre><code>function hover = function(tr,cod)
{
    if(cod)
    {
     tr.addClass("hover");
    }else{
     if(tr.is(":odd"))
     {
      tr.addClass("odd");
     }else{
      tr.removeClass();
     }
    }
}
</code></pre>

<p>anyone can tell me what's wrong?</p>

<p>thx in advance.</p>
