once-on-transition-end

1.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i once-on-transition-end

Weekly Downloads

17

Version

1.0.1

License

MIT

Unpacked Size

2.61 kB

Total Files

4

Last publish

Collaborators

  • jonathanp