animateCSS icon indicating copy to clipboard operation
animateCSS copied to clipboard

Stopping current animated and start a different one.

Open custa1200 opened this issue 9 years ago • 2 comments

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.

custa1200 avatar May 25 '15 05:05 custa1200

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?

craigmdennis avatar Oct 17 '15 00:10 craigmdennis

I am reminded of stop() and .finish() for jQuery animation methods: https://api.jquery.com/category/effects/

mhulse avatar Jan 29 '17 23:01 mhulse