Get CSS transition event or call callback on CSS transition end
.getEndEvent()
Get CSS transition end event name supported for browser e.g. oTransitionEnd
or webkitTransitionEnd
.onEnd(element, callback)
Run callback after CSS transition end specified DOM element
var transitionUtility = require('transition-utility');
var transitionEndEvent = transitionUtility.getEndEvent();
var domElement = document.querySelector('.transition-element');
console.log(transitionEndEvent); // return transition event
transitionUtility.onEnd(domElement, function () {
alert('End of transition');
});
Transition-utility is copyright © 2015 Jakub Laptas and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.