Created
May 23, 2016 03:38
-
-
Save joshuacerbito/2e282057898712b60460bde6e9d35917 to your computer and use it in GitHub Desktop.
Native JS Object Selector
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 $$(selector, context) { | |
context = context || document; | |
var elements = context.querySelectorAll(selector); | |
return Array.prototype.slice.call(elements); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment