Skip to content

Instantly share code, notes, and snippets.

@ZeeAgency
Created October 22, 2013 08:23
Show Gist options
  • Save ZeeAgency/7097023 to your computer and use it in GitHub Desktop.
Save ZeeAgency/7097023 to your computer and use it in GitHub Desktop.
Transition Events vs. Chrome double events (vendor-prefixed and not...)
$(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