I have this basic code which hides the closest tr if .foo contains a string:
$('.foo:contains("blah")').each(function() {
$(this).closest('tr').hide();
});
but the time has come that "blah" is not the only string I need to check for, I realise I now need to use an array but not sure how.
I took a wild guess and tried:
var arr = ['blah', 'foo', 'bar'];
$('.foo:contains("+arr[]+")').each(function() {
$(this).closest('tr').hide();
});
but to no avail.