:containsNoCase
Custom jQuery filter that behaves like the :contains() filter, but is case insensitive.
Example
// Search Filter - filter based on textbox input all list elements
$('#txtSearch').keyup(function() {
var search = $(this).val();
if (!search)
$(".list-item").show(); // show all items
else
// show only those that have text matching search text
$(".list-item").hide().filter(":containsNoCase('" + search + "')").show();
});
© West Wind Technologies, 1996-2024 • Updated: 04/27/14
Comment or report problem with topic