Skip to content

Instantly share code, notes, and snippets.

@iamntz
Created May 6, 2012 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamntz/2623199 to your computer and use it in GitHub Desktop.
Save iamntz/2623199 to your computer and use it in GitHub Desktop.
$('#myElement').live('webkitAnimationEnd webkitAnimationStart keyframe', function(e){
switch( e.type ){
case 'webkitAnimationEnd':
// end event
break;
case 'webkitAnimationStart':
// start event
break;
case 'keyframe':
// trigger event
console.log(e.originalEvent.percent);
break;
}
});
$('#myElement').keyframe(); // plugin init
$('#myElement').addClass('ani foo'); // css animation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment