Last active
December 21, 2015 00:58
-
-
Save 74togo/6224233 to your computer and use it in GitHub Desktop.
A super 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
/* | |
Recursively searches the document, and the iframes within it for elements. | |
Usage: exactly like jQuery() or $() | |
*/ | |
var $$$ = function(thing, doc) { | |
var res = $(thing, doc); | |
$("iframe", doc).each( function(){ | |
res = res.add( $$$(thing, this.contentDocument) ); | |
}); | |
return res; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment