jQuery case-insensitive : Contains expression

/** 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;
};

Leave a Reply