Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created February 18, 2010 21:24
Show Gist options
  • Select an option

  • Save defunkt/308086 to your computer and use it in GitHub Desktop.

Select an option

Save defunkt/308086 to your computer and use it in GitHub Desktop.
Case insensitive jQuery :Contains filter
// Case insensitive jQuery :Contains filter
jQuery.expr[':'].Contains = function(a,i,m) {
return (a.textContent || a.innerText || "").toLowerCase()
.indexOf(m[3].toLowerCase()) >=0 ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment