Skip to content

Instantly share code, notes, and snippets.

@unruthless
Created March 13, 2015 18:44
Show Gist options
  • Save unruthless/7aa125be39eb57ab19c7 to your computer and use it in GitHub Desktop.
Save unruthless/7aa125be39eb57ab19c7 to your computer and use it in GitHub Desktop.
Transition bind/unbind pattern
var transitionend = 'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',
$el = $('.foo'),
onTransitionEnd = function(event) {
$el.off(transitionend);
};
$el.on(transitionend, onTransitionEnd);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment