Skip to content

Instantly share code, notes, and snippets.

@jaxgeller
Last active January 8, 2016 15:14
Show Gist options
  • Save jaxgeller/00e0b6775d1250c6094b to your computer and use it in GitHub Desktop.
Save jaxgeller/00e0b6775d1250c6094b to your computer and use it in GitHub Desktop.
tweezer-
document.querySelector('#animate-height-button')
.onclick = () => {
if (!isRunning) {
new Tweezer({
start: animatedHeight.getBoundingClientRect().height,
end: grow(shouldGrow)
})
.on('tick', v=> animatedHeight.style.height = v +'px')
.on('done', ()=> {
shouldGrow = !shouldGrow
isRunning = false
})
.begin()
isRunning = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment