Created
April 9, 2018 09:37
-
-
Save luckyshot/e43eeff313be1a995409a5a90e9c5344 to your computer and use it in GitHub Desktop.
QuerySelector short-hand
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
$ = function(sel, ctx){return (ctx || document).querySelector(sel)} | |
$$ = function(sel, ctx){return (ctx || document).querySelectorAll(sel)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment