You want to use the afterFinish callback and set the background to
whatever color you need to. Setting the background color to an empty
string will have no effect (at least not when I tested it in Safari).
Also the way your setStyle() call is written, it will result in a
syntax error since the dash is an illegal character in that context as
well as the loose trailing semicolon.

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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to