Skip to content

Instantly share code, notes, and snippets.

@jaxgeller
Last active January 8, 2016 15:14
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