Skip to content

Instantly share code, notes, and snippets.

@JohnLouderback
Forked from adamjmcintyre/gist:3098766
Created June 30, 2014 23:32
Show Gist options
  • Save JohnLouderback/5636b89449cc987f7432 to your computer and use it in GitHub Desktop.
Save JohnLouderback/5636b89449cc987f7432 to your computer and use it in GitHub Desktop.
$('.some-els').bind('animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd', function(){
// Do something!
$(this).removeClass('animation-class');
})
.addClass('animation-class');
// One works, too
$('.some-els').one('animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd', function(){
// Do something once!
console.log('this would show once');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment