skip to Main Content

Html – How to trigger multiple animations when the user clicks on the <a> (link)

I have this Html code and I want all the animations to be played after clicking on the link : document.querySelector('.play').addEventListener('click', function() { document.querySelector('.trans-up').style.animationPlayState = 'running'; document.querySelector('.trans-mid').style.animationPlayState = 'running'; document.querySelector('.trans-down').style.animationPlayState = 'running'; }); .trans-up { animation: trans-up-anim 1.8s forwards; }…

VIEW QUESTION
Back To Top
Search