Created
September 29, 2015 13:58
-
-
Save pieterbeulque/ee0ad8d2f03cfa9bf44e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 onTransitionEnd (callback, $element) { | |
if ('ontransitionend' in window || 'onwebkittransitionend' in window ) { | |
$element.on('transitionend', callback); | |
} else { | |
callback(); | |
} | |
} | |
onTransitionEnd(() => { console.log('hey'); }, $(document.body)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment