Was feeling a bit generous, the below code does the following
- On checkbox change, map an array of selected values
- Iterate selected values and find
td
containing said value Show parent
tr
of selected value$(":checkbox").change(function() { var checkedValues = $(":checkbox:checked").map(function() { return this.value; }).get(); $("tbody tr").hide(); for (var i = 0; i < checkedValues.length; i++) { $("tbody tr td:contains('" + checkedValues[i] + "')").parent("tr").show(); } });