I have to change colors for alternative rows. one row in "Green" and another one is in "Yellow".
<tr class="ms-viewheader" vAlign="top">
<tr class="">
<tr class="ms-alternating">
<tr class="">
<tr class="ms-alternating">
<tr class="">
<tr class="ms-alternating">
<tr class="">
<tr class="ms-alternating">
I have to skip "ms-viewheader" row and start coloring next sibling. Full row should be in color.
How to do this?
run something like this in javascript
// define the background color for even and odd rows
var bgColors = {
even: '#eaeaea',
odd: '#aeaeae'
};
$("table tr:not(.ms-viewheader):even").css({"backgroundColor":bgColors.even});
$("table tr:not(.ms-viewheader):odd").css({"backgroundColor":bgColors.odd});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With