I'm creating a table and i want to highlight a specific row.
I did this using:
$this.css('background-color', 'green');
$this.delay(3000).animate({ backgroundColor: $color }, 3000);
$this = the row in question.
$color = the previous row color.
But i want it to work with the a css class, so something like this
$this.addClass('highlight');
The class .highlight
will only have a background-color
.
The problems is that, after i add the class, i can't the background-color
.
If i use:
$this.delay(3000).animate({ backgroundColor: $color }, 3000);
it doesn't seem to work because it doesn't overrides the background-color
property of the class .highlight itself.
And i don't see a way to animate a removeClass
method or even a switchClass
from .highlight
to ''
.
Is there any solution i'm not thinking off to do this.
Thanks in advance.