1.0.1 • Published 5 years ago

once-on-transition-end v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

once-on-transition-end

NPM version

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

1.0.1

5 years ago

1.0.0

8 years ago