I have an HTML table in which I dynamically add and hide rows, and I want the current set of visible rows to always show with an alternate inverse color for readability.
I have the following code that works fine, but very slow (especially in Internet Explorer browsers)
$('table.alternateRow tr:visible').removeClass('odd').filter(':odd').addClass('odd');
here is my css:
.alternateRow tr {
background-color: #FFFFFF;
}
.alternateRow tr.odd {
background-color: #DEDEDE;
}
Is there a faster solution for this above code that applies to visible lines but doesn't freeze in Internet Explorer. My table has about 150 - 200 rows visible
Also, (for certain reasons) I want to avoid paging if possible (as a last resort), since it makes the report much more difficult to read