Created
October 22, 2013 08:23
-
-
Save ZeeAgency/7097023 to your computer and use it in GitHub Desktop.
Transition Events vs. Chrome double events (vendor-prefixed and not...)
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
$(function() { | |
var transitionEventsNames = 'transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', | |
fn = function(e) { | |
$(this).off(transitionEventsNames, fn); | |
$(this).on(transitionEventsNames, fn); | |
console.log('transition', e); | |
}; | |
$('.foo').on(transitionEventsNames, fn); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment