Skip to content

Instantly share code, notes, and snippets.

@adamjmcintyre
Created July 12, 2012 15:15
Show Gist options
  • Select an option

  • Save adamjmcintyre/3098766 to your computer and use it in GitHub Desktop.

Select an option

Save adamjmcintyre/3098766 to your computer and use it in GitHub Desktop.
Using CSS keyframe animationend event cross-browser with jQuery
$('.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');
});
@newshorts
Copy link
Copy Markdown

thanks

@eahang
Copy link
Copy Markdown

eahang commented Nov 5, 2015

it works thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment