-
-
Save mulhoon/a9d554544fe6dd875f7682f147eb4e2d to your computer and use it in GitHub Desktop.
jQuery selection in One Line
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(s){return s.charAt(0)==='#' ? document.getElementById(s.slice(1)) : document.querySelectorAll(s);}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment