Quantcast
Channel: zReference
Browsing latest articles
Browse All 19 View Live

Bring any DOM Element to Top

myEl.parentNode.appendChild(myEl); Bring myEl to the top within its `parentNode`.

View Article


Quick 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 Article


XOR 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 Article

ES6 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 Article

PhotoDa 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

Browsing latest articles
Browse All 19 View Live