Jquery and css animating am I doing it right?
-
Hi all I am fairly new to this but after hours of reading I found a way of making an animation I wrote using css @keyframes, not to play when the page loads but to play when I hover/ click a certain button. I just wanted to check if you thought using .addClass/ .removeClass was an alright way of doing this so that upon the specified event, the element switches out its style according to the style sheet so it will play the animation held in the style sheet. Or should I be doing this another way? I know about the html even attributes like onclick="" but I wouldn't know how to write a javascript function to make the animation play..Add a Comment