ColdFusion ORM Book Experimenting with CSS3 transition callbacks
The Web Dev Zone is brought to you in partnership with Mendix. Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.
I was discussing with my colleague Andy Beer about replacing some jQuery animation with CSS3 transitions so that we could make use of hardware acceleration. This lead me to start thinking about how you'd handle callbacks if you wanted to chain together animations as CSS doesn't have events.
There are a couple of things to note here; firstly that FireFox uses the 'transitionend' event name (and IE is supposed to as well) and WebKit based based browsers use webkitTransitionEnd. The other thing, which I hadn't expected was that the event fires twice - once for the end of the left transition, and again once the top transition ends. If you ran the fiddle you will have noticed that I've logged the property name of the completed transition by calling e.propertyName.
So, if you wanted to fire another animation, you could do so from the transitionEnd function. However as it's not widely adopted, I can't see myself using this in production just yet.