Does the class that you are applying to your <tr> set the background-
color on the <tr> itself? If so, you might want to try modifying your
CSS a bit to apply the background-color to the <td> elements in your
<tr> like:

tr.newClass td {
    background:#ff0000;
}

Hope this helps.

On Dec 20, 4:31 am, JQueryProgrammer <[EMAIL PROTECTED]> wrote:
> I have a table that displays n rows based on the records from the
> database. For a particular row that gets displayed n times, I have
> assigned a name to the row. The row already has some CSS applied to
> it. But I want that whenever I take the mouse over the row, the new CC
> should get applied and the on mouse out the old CSS should reapply.
>
> I tried the code as:
>
> $("tr[name='myRowName').hover(
>         function() {
>                 $(this).addClass("newClass");
>         }, function() {
>                 $(this).removeClass("newClass");
>         }
> );
>
> But it does not work. Can anyone let me know.

Reply via email to