Created
January 27, 2014 10:07
-
-
Save jjmu15/8646083 to your computer and use it in GitHub Desktop.
Create $ selector in vanilla JS
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
// This gives us simple dollar function and event binding | |
var $ = document.querySelectorAll.bind(document); | |
Element.prototype.on = Element.prototype.addEventListener; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment