Loren
Loren

Reputation: 14856

Can you get animationend to fire when changing style attribute?

It's not firing in this example:

http://codepen.io/loren/pen/QbeyEy

<div id='slider'></slider>

#slider
  width 100px
  height 50px
  background-color black
  transition transform 300ms 

$slider = $('#slider')

$slider.one 'animationend', ->
  alert 'ended'

setTimeout ->
  $slider.css 
    transform: 'translate(100px,0px)'
, 1000

Upvotes: 0

Views: 34

Answers (1)

Loren
Loren

Reputation: 14856

The correct event is transitionend, not animationend.

Upvotes: 1

Related Questions