animateCSS
animateCSS copied to clipboard
Stopping current animated and start a different one.
Hi Is there any way to stop current running animations and start a different one. i.e. I am animating a block out on a keypress but on another keypress before the first animation has finished I want to start a new animation that returns the bock to the initial position.
You might be able to use the animation-play-state
http://www.w3schools.com/cssref/css3_pr_animation-play-state.asp .
I might be able to add a method which does this.
What would the expected behaviour be?
- Skip to the end of the animation
- Pause the animation
- Skip to the start of the animation (initial state)
- Reverse the animation back to the start?
I am reminded of stop()
and .finish()
for jQuery animation methods: https://api.jquery.com/category/effects/