@taikonauten/transitionend
v3.0.7
Published
Simple transition end helper
Downloads
105
Keywords
Readme
transitionend helper
Fires the given callback when all given nodes received a transitionend
event with the given property name.
Usage
npm install --save @taikonauten/transitionend
import transitionEnd from 'transitionend';
// class selector, propertyName
await transitionEnd('.transition', 'transform');
console.log('transition(s) ended.');
// Node, propertyName
const element = document.getElementById('test');
await transitionEnd(element, 'transform')
console.log('transition(s) ended.');
// NodeList, propertyName
const elements = document.querySelectorAll('a');
await transitionEnd(elements, 'transform')
console.log('transition(s) ended.');