Created
September 30, 2011 15:12
-
-
Save terkel/1254045 to your computer and use it in GitHub Desktop.
CSS4 :matches selector for jQuery
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
// http://twitter.com/padolsey/status/119790781417537536 | |
$.expr[':'].matches = (function (_) { | |
return function (el, i ,m) { | |
return !!_(m[3]||'*',[el])[0]; | |
}; | |
}($.find.matches)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment