Thank you @dfsq for the very helpful code!
I've made some adjustments and maybe some others like them too. I ensured that you can search for multiple words, without having a strict match.
Example rows:
You could search for 'ap pe' and it would recognise the first row
You could search for 'banana apple' and it would recognise the second row
Demo: http://jsfiddle.net/JeroenSormani/xhpkfwgd/1/
var $rows = $('#table tr');
$('#search').keyup(function() {
var val = $.trim($(this).val()).replace(/ +/g, ' ').toLowerCase().split(' ');
$rows.hide().filter(function() {
var text = $(this).text().replace(/\s+/g, ' ').toLowerCase();
var matchesSearch = true;
$(val).each(function(index, value) {
matchesSearch = (!matchesSearch) ? false : ~text.indexOf(value);
});
return matchesSearch;
}).show();
});