Reputation: 493
I have an animation in CSS that is a '-moz-keyframe' animation. I can't seem to find any function in Javascript that will run the animation. How do I do it?
Upvotes: 0
Views: 86
Reputation: 14456
Create a CSS class that contains nothing but the rules for the animation. Then just add/remove that class with JavaScript.
Upvotes: 1
Reputation: 4915
It is Mozilla CSS. You don't need to have a JS code for this animation. Just use the CSS attribute on the element. Check out this example: https://developer.mozilla.org/samples/cssref/animations/cssanim1.html
You can check more information at Mozilla CSS animations
Upvotes: 1