Check out the fiddle I created: http://jsfiddle.net/52aK9/239/
In the fiddle, you may notice that the first two rows are supposed to be grey and the table's zebra or striped design is not displaying correctly as expected.
I've attempted various methods to fix this issue, but so far, none of them have been successful.
Below is the code snippet:
$(document).ready(function () {
(function ($) {
$('#filter').keyup(function () {
var rex = new RegExp($(this).val(), 'i');
$('.searchable tr').after('<tr></tr>').hide();
$('.searchable tr').filter(function () {
return rex.test($(this).text());
}).show();
})
}(jQuery));
});
Does anyone know how to ensure that the striping of the table rows always works properly?