I am successfully using jquery odd/even selectors to create a "tiger striping" on a table. Then I added ability to add or deleted rows. However I have not been able to get striping to work properly on add/delete of row. It works for a an add/append, but not on add/prepend or delete. Here is summary of the code...
$(document).ready(function(){
// click on Add Row button
$("#addButton").click(function(){
// add a row to table
addTableRow('#myTable');
// then re-apply tiger striping
stripeRows();
});
});
// remove specified row
function removeRow(row) {
$(row).parent("tr").remove();
stripeRows();
}
function StripeRows()
{
$("#myTable").each(function(){
$(this).find("tr:even").addClass("evenrow");
$(this).find("tr:odd").addClass("oddrow");
});
}