Skip to content

Instantly share code, notes, and snippets.

@WillsonSmith
Created May 2, 2013 21:18
Show Gist options
  • Save WillsonSmith/5505539 to your computer and use it in GitHub Desktop.
Save WillsonSmith/5505539 to your computer and use it in GitHub Desktop.
Quick and small way to make a "bling" element selector. Avoid JQuery when it is not necessary.
var $ = document.querySelectorAll.bind(document);
Element.prototype.on = Element.prototype.addEventListener;
$('@cursor')[0].on('touchstart', handleTouch);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment