:containsNoCase

less than 1 minute to read

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

Example

javascript
// 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-2025 • Updated: 01/07/25
Comment or report problem with topic