Skip to content

Instantly share code, notes, and snippets.

@Jagathishrex
Last active November 28, 2019 17:50
Show Gist options
  • Save Jagathishrex/25870f6e6d85dee709744f7db9f9846f to your computer and use it in GitHub Desktop.
Save Jagathishrex/25870f6e6d85dee709744f7db9f9846f to your computer and use it in GitHub Desktop.
function getTransitionEndEventName() {
var transitions = {
"transition" : "transitionend",
"OTransition" : "oTransitionEnd",
"MozTransition" : "transitionend",
"WebkitTransition": "webkitTransitionEnd"
}
let bodyStyle = document.body.style;
for(let transition in transitions) {
if(bodyStyle[transition] != undefined) {
return transitions[transition];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment