Formatting background with cycle

I've got a <tr> with onmouseout="'<%=
cycle(odd-row, 'even-row')%>';"

But that doesn't seem to work. onmouseover changes the bg to white, and
I need to get the color back to its original color onmouseout.

The problem is the color is different for alternating rows.

Any help is appreciated!

The result of your cycle will be a string, so the normal way to use
this would be to assign the string to a class name,
and then for each class, you define the background style you need in
your stylesheet.

<tr class="<%= cycle("even", "odd") -%>">


If you want to build the whole style fro the cycle, it would need to
be like this

style="background-color: <%= cycle("#fff", "#ccc")