Bring any DOM Element to Top
myEl.parentNode.appendChild(myEl); Bring myEl to the top within its `parentNode`.
View ArticleQuick Alphabet Array
var alphabet = 'abcdefghijklmnopqrstuvwxyz'.split(''); console.log('this is the letter b...', alphabet[1]); console.log(alphabet); The above will output: this is the letter b... b ["a", "b", "c", "d",...
View ArticleXOR Color Invert
var color = 0xFFFF00; function toHex(color) { return '#' + ('000000' + color.toString(16)).substr(-6); } function onClick() { color ^= 0xFFFFFF; document.body.style.background = toHex(color); }...
View ArticleES6 Mode Mouse Event Manager
let ui = { ['draw-poly-mousedown'](e) { console.log('draw poly mouse down'); }, ['draw-poly-mouseup'](e) { console.log('draw poly mouse up'); }, execMode(e) { let fn = ui[`${ui.mode}-${e.type}`]; if...
View ArticlePhotoDa Image Generator
I created an IOS app that creates images from existing things in your camera. check it out: https://itunes.apple.com/app/id1291121692
View Article