I've read lots of suggestions on how to make contains case insensitive, but none seem to fit with what I've got. Sorry if I've missed the obvious.
I've got this.
var data = this.value.split(" ");
$.each(data, function(i, v) {
rows.filter(":contains('" + v + "')").show();
});
How do I make it case insensitive ?
Thanks.
UPDATE
I've got this working using:
var data = this.value.split(" ");
$.each(data, function(i, v) {
rows.filter(":Contains('" + v + "')").show();
});
});
jQuery.expr[":"].Contains = jQuery.expr.createPseudo(function(arg) {
return function( elem ) {
return jQuery(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
};