Last active
December 9, 2015 21:59
-
-
Save michaelbramwell/4334267 to your computer and use it in GitHub Desktop.
jQuery icontains extension. :contains('') lowercase alt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.expr[':'].icontains = function (a, i, m) { | |
///<summary>Extend jQuery with case insentive contains selector</summary> | |
return jQuery(a).text().toUpperCase() | |
.indexOf(m[3].toUpperCase()) >= 0; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment