Skip to content

Instantly share code, notes, and snippets.

@evilpie
Created January 30, 2013 14:06
Show Gist options
  • Save evilpie/4673500 to your computer and use it in GitHub Desktop.
Save evilpie/4673500 to your computer and use it in GitHub Desktop.
function Q(s, f) {
var r = document.querySelectorAll(s), a = [ ];
[ ].slice.call(r).forEach(function(e, i) {
a[i] = e;
f && f(e);
});
return a;
}
function Q(s, f) {
var r = document.querySelectorAll(s), a = [ ];
Array.prototype.forEach.call(r, function(e, i) {
a[i] = e;
f && f(e);
});
return a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment