Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery Highlight assumes background is white

I'm trying to do a highlighting effect on certain cells in a table. My problem is that for some reason the jQuery highlighting effect seems to assume that the background color is white by default. So if my table's row is dark grey, for example, it will flash with the color I specify and then fade back to white?? and then switch to the dark grey again.

I have managed to reproduce it on jsFiddle (tested with Chrome). Just click on the table row to see what I'm talking about.

http://jsfiddle.net/ZncRM/

I would like it to fade back to the proper background color - dark grey in this case. How do I do that?

Just to clarify - on the example listed in the jQuery documentation it doesn't seem to fade to white at all. jQuery Highlight Example

like image 980
Jaco Pretorius Avatar asked Mar 18 '11 09:03

Jaco Pretorius


1 Answers

You just have to set a background color for the TD as well.

tr, td
{ 
    background-color: #d8d8d8; 
}

Example for you here.

like image 85
Kyle Avatar answered Oct 13 '22 12:10

Kyle