Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// returns first element selected - $('input[name="food"]')
var $ = document.querySelector.bind(document);
// return array of selected elements - $$('img.dog')
var $$ = document.querySelectorAll.bind(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment