Created
August 22, 2017 12:52
-
-
Save MightyPork/9b40f078dc3579af49a347e34fd9590b to your computer and use it in GitHub Desktop.
tiny inlineable query library to replace 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
// uQuery | |
function qsa(q){return document.querySelectorAll(q)} | |
function qs(q){return document.querySelector(q)} | |
function bind(el,evt,fn){el.addEventListener(evt,fn)} | |
function qbind(q,evt,fn){var els=qsa(q);els&&els.forEach(function(el){el.addEventListener(evt, fn)})} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment