Sha256: 378dfafa32d81aceb418361c7a625b0e0c6170c8f890da0386d6131a76650925
Contents?: true
Size: 643 Bytes
Versions: 16
Compression:
Stored size: 643 Bytes
Contents
/* eslint-disable no-unused-vars */ // // Handle clearing out of animation styles from complete animation. const animateCSS = (element, animation, speed, prefix = 'animate__') => new Promise((resolve) => { const animationName = `${prefix}${animation}` const node = document.querySelector(element) node.classList.add(`${prefix}animated`, animationName, prefix + speed) function handleAnimationEnd(event) { event.stopPropagation() node.classList.remove(`${prefix}animated`, animationName) resolve('Animation ended') } node.addEventListener('animationend', handleAnimationEnd, { once: true }) })
Version data entries
16 entries across 16 versions & 1 rubygems