Skip to content

Instantly share code, notes, and snippets.

@raglan-road
Created August 4, 2012 14:47
Show Gist options
  • Save raglan-road/3258186 to your computer and use it in GitHub Desktop.
Save raglan-road/3258186 to your computer and use it in GitHub Desktop.
Cross-browser jQuery support for CSS3 animationend event
// jQuery support for CSS3's animationend, which fires when a keyframe animation completes.
// This covers all of the combinations of vendor prefixes for the event, so it will work cross-browser.
// transitionend would work the same way.
$('.some-el-that-you-are-animating').bind('animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd', function(){
// this => element that just animated
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment