I am trying to have an animation run only when the mouse is over an object. I can get one iteration of the animation and then have it set back to normal on mouse out. But I’d like the animation to loop on mouseover. How would I do it, using setInterval? I’m a little stuck.
Share
It could be done like this:
Now, you can do this:
If you wanted the animation immediately stop, you could change the
hoverOutline to read: