Created
August 28, 2014 21:11
-
-
Save paul-bjorkstrand/c13b057bc1f6b9e24ed3 to your computer and use it in GitHub Desktop.
jQuery.parents-selector.js
This file contains hidden or 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
(function($) { | |
$.expr[":"].parents = $.expr.createPseudo(function(arg) { | |
return function( elem ) { | |
return $(elem).parents(arg).length > 0; | |
}; | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment