Last active
August 29, 2015 14:12
-
-
Save marioblas/306c8de3ff77b2b9b1e8 to your computer and use it in GitHub Desktop.
jQuery - Detect the completion of an animation/transition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#foo').on('webkitAnimationEnd mozAnimationEnd animationend', function() { | |
// Do something after animation... | |
}); | |
// Note: transitionend fires for each property transitioned! | |
// mozTransitionEnd? | |
// oTransitionEnd for old Opera | |
$('#bar').on('webkitTransitionEnd mozTransitionEnd otransitionend oTransitionEnd transitionend', function() { | |
// Do something after transition... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment