I’ve got this bit of code, which works fine for alternating the actual rows, but only hovers on the “odd” rows.
I’m using the following code:
<script type="text/javascript">
$(document).ready(function(){
//jQuery ready is quicker than onload
$(".stripeMe tr").mouseover(function(){$(this).addClass("over");}).mouseout(function(){$(this).removeClass("over");});
$(".stripeMe tr:even").addClass("alt");
});
This is the css that I’m using
#table tr.over td{background: #bcd4ec;}
#table tr.alt td {background: #ecf6fc;}
Any ideas?
You over style is overridden with your alt style. You have to switch the lines.
Now
.althas a lower priority than.overbecause it’s defined earlier.