Skip to content

Instantly share code, notes, and snippets.

View spiralx's full-sized avatar

James Skinner spiralx

View GitHub Profile
@spiralx
spiralx / select.js
Created February 21, 2018 18:38 — forked from Raynos/select.js
tiny select. Selecting has never been so awesome \o/
// Pretty fast - http://jsperf.com/select-vs-natives-vs-jquery
/*
By, shortcuts for getting elements.
*/
var By = {
id: function (id) { return document.getElementById(id) },
tag: function (tag, context) {
return (context || document).getElementsByTagName(tag)
},
"class": function (klass, context) {