once-on-transition-end
v1.0.1
Published
A higher order function that provides a timeout to the `transitionEnd` event
Downloads
110
Readme
once-on-transition-end
A higher order function that provides a timeout to the
transitionEnd
event
Install
$ npm install --save once-on-transition-end
How to use
import onceOnTransitionEnd from 'once-on-transition-end';
const element = document.getElementById('foo'); // the DOM element
const callback = function() { } // the function to invoke when the transition is done or after the timeout, whatever happens first
const timeout = 1000; // the timeout
onceOnTransitionEnd(element, callback, timeout);
License
MIT © Jonathan Svenheden