Skip to content

Instantly share code, notes, and snippets.

@oldergod
Created June 30, 2016 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oldergod/f62a6b834c6e6fcfd565cea0d2f0520a to your computer and use it in GitHub Desktop.
Save oldergod/f62a6b834c6e6fcfd565cea0d2f0520a to your computer and use it in GitHub Desktop.
Animation based trigger
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