JSFiddle - React, Tailwind, and code Playground
HTML
<table id="demo">
</table>
JavaScript
// populate the table with demo data
for (var r = 0; r < 15; r++){
$('<tr>').append($('<td>').text('Row '+r)).append($('<input>').attr({
type: 'button',
value: 'Delete Row',
class: 'delete'
})).appendTo('#demo');
}
// first, color our rows
function Stripe()
{
$('#demo tr')
.filter('tr:even').css('backgroundColor','#CCCCCC').end()
.filter('tr:odd').css('backgroundColor','#EEEEEE');
}
// sample "row delete"
$('.delete').click(function(){
$(this).closest('tr').remove();
Stripe();
});
Stripe();