jQuery case-insensitive : Contains expression

[javascript]
/** Add a case insensitive Contains expression to jQuery so make our filtering easier */
jQuery.expr[‘:’].Contains = function (a, i, m) {
return (
a.textContent ||
a.innerText ||
""
).toUpperCase().indexOf(m[3].toUpperCase()) >= 0;
};

[/javascript]

Leave a Reply