Created
June 30, 2016 13:58
-
-
Save oldergod/f62a6b834c6e6fcfd565cea0d2f0520a to your computer and use it in GitHub Desktop.
Animation based trigger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const el = document.querySelector('.el'); | |
elA.addEventListener('animationend', () => { | |
elA.classList.remove('.animating'); | |
}): | |
// triggers CSS animation which time varies | |
elA.classList.add('.animating'); | |
// How to check that the class `animating` is rightly removed when the animation finishes? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment