Problem with animation in JavaScript

#codePenChallenge: Shake

I’m having a problem with the animation-play-state in the JS. CodePen is telling me that it is not a property. The idea of the pen is to make the glass emoji shake when a button is clicked, and stop when the other button is clicked. Can somebody explain?

I would read the docs for getElementsByClassName again, especially the part about what value it returns. There is a good example that you should check out too.

P.S. Not sure using the “shake” class for both the <p> and the <span> is the best move.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.