Based on dribbble shot https://dribbble.com/shots/2097042-Widget-Weather by kylor
A Pen by Josh Bader on CodePen.
development: | |
closure-library/closure/bin/build/closurebuilder.py --root=closure-library/ --root=js/ --namespace="YourRootNameSpace" --output_mode=compiled --compiler_jar=compiler.jar > compiled.js | |
production: | |
closure-library/closure/bin/build/closurebuilder.py --root=closure-library/ --root=js/ --namespace="YourRootNameSpace" --output_mode=compiled --compiler_jar=compiler.jar --compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS" > compiled.js | |
all: | |
development |
window.innerHeight+(window.scrollY || document.documentElement.scrollTop) > document.documentElement.scrollHeight |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body { | |
height: 3000px; | |
} | |
.scroll { |
var timeoutID; | |
function setup() { | |
this.addEventListener("mousemove", resetTimer, false); | |
this.addEventListener("mousedown", resetTimer, false); | |
this.addEventListener("keypress", resetTimer, false); | |
this.addEventListener("DOMMouseScroll", resetTimer, false); | |
this.addEventListener("mousewheel", resetTimer, false); | |
this.addEventListener("touchmove", resetTimer, false); | |
this.addEventListener("MSPointerMove", resetTimer, false); |
function debounce(func, wait, options) { | |
var args, | |
maxTimeoutId, | |
result, | |
stamp, | |
thisArg, | |
timeoutId, | |
trailingCall, | |
lastCalled = 0, | |
maxWait = false, |
.ui-select-bootstrap.ng-invalid span.btn.ui-select-toggle { | |
border-color: #D44950 !important; | |
} |
Based on dribbble shot https://dribbble.com/shots/2097042-Widget-Weather by kylor
A Pen by Josh Bader on CodePen.
function isDescendant(parent, child) { | |
var node = child.parentNode; | |
while (node != null) { | |
if (node == parent) { | |
return true; | |
} | |
node = node.parentNode; | |
} | |
return false; | |
} |
function parseLodash(str){ | |
return _.attempt(JSON.parse.bind(null, str)); | |
} |