I’ve just recorded a screencast version of my post about how to create a jQuery instant filter for SharePoint 2010 lists. Enjoy! (The code featured in the video is pasted below)
jQuery.expr[':'].Contains = function(a,i,m){return (a.textContent || a.innerText || "").toUpperCase().indexOf(m[3].toUpperCase())>=0;};
$(document).ready(function(){
var webPartID = $("#WebPartWPQ2");
$(webPartID).prepend('<div style="padding: 2px; border: 1px solid rgb(204, 204, 204); margin: 5px auto 0pt; background: #ccc; display: block;"><h3 style="text-align: center;margin:2px;">Instant search: <input type="text" class="search" style="padding: 5px;"/></h3></div>');
$("input.search").change(function() {
var txt = $("input.search").val();
if (txt) {
$(webPartID).find("td:not(:Contains("+txt+"))").parent("tr.ms-itmhover").hide();
$(webPartID).find("td:Contains("+txt+")").parent("tr.ms-itmhover").show();
} else {
$(webPartID).find("td").parent("tr.ms-itmhover").show();
}
}).keyup(function(){$(this).change();
})
});

Thank you, very nice example!
if i want to apply the search filter for the list in a particular page.
Can i add the .js file and .jquery file links in the CEWP?
I tried its not working.
I liked it and found it very usefull,well done, and also my compliments on the way you presented you work in the screencast- very comprehensive.
B
Can I implement this jquery filter using the CEWP? My client will not allow me to use SP Designer, but has requested this functionality. Any help you can provide would be greatly appreciated.
Thanks,
Brian
Definitely. Save this script in a .js file somewhere in a document library (if you don’t have access to SPD), and then reference it in the CEWP in your page. That’s really all you need to do (assuming jQuery is already loaded…otherwise do the same thing). Hope that helps.
Thanks. I got the search to display, but when I enter an item nothing happens. I searched for the tr.ms-itemhover class I the source and using IEdeveloper browser tool but found nothing. Is there another class that you would recommend?
Thanks,
Brian