Note that the :hover pseudo class is not supported in IE6 on any
element except an anchor.
-justin
Try something like this:
var element = $('itemHighlight'); // assuming element with ID of
itemHighlight is a TR with an odd or even class
element.highlight({ afterFinish:function(effectObject){
if (effectObject.element.hasClassName('odd'))
effectObject.element.setStyle('background-color:#fff;');
else effectObject.element.setStyle('background-color:#F1F5F9;');
}});
Also you can simplify your markup and CSS a tiny bit by not worrying
about assigning both an odd and even class to each row, just pick one
and go with that, for example only add the odd class to every other
row, then your CSS is:
tr{ background:#F1F5F9; }
tr.odd{ background:#fff; }
And since your hover color is the same for each row (regardless of if
it is odd or even), then you don't need the extra complicated selector
(class with hover pseudo class) and just go with:
tr:hover{ background:#DADFE4 }
Hope this helps.
-justin
With your help now it is working finally :-)
Though it does not respect the hover state when I set explicitly the
background color as in your code snippet. I had to set the background
style to empty string:
var element = $('<wo:str value="$id" />');
element.highlight({ afterFinish: function(effectObject) {
effectObject.element.style.background = "";
}});
This works in Safari and Firefox.