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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    19
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    19
  • 1.0.0
    93

Package Sidebar

Install

npm i once-on-transition-end

Weekly Downloads

108

Version

1.0.1

License

MIT

Unpacked Size

2.61 kB

Total Files

4

Last publish

Collaborators

  • jonathanp