An element will fire the animationstart and animationstartend events when CSS animations are declared. This lets you fire a javascript function when:
animationstart
animationstartend