Custom jQuery filter that behaves like the :contains() filter, but is case insensitive.


// 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
        // show only those that have text matching search text
        $(".list-item").hide().filter(":containsNoCase('" + search + "')").show();

© West Wind Technologies, 1996-2024 • Updated: 04/27/2014
Comment or report problem with topic