Jquery animate rainbow color change

Let's say I have this image:

animated line

The color of the line is a gradient from yellow to purple. Now my question is this: is there a way to create a gif or use jquery or another form of javascript to make an endless animation of colors changing from left to right?

Appreciate any help :)

+4
source share
1 answer

What you are trying to do can be done using sprite animations.

Basically, you can use jQuery to quickly change the background position of an element that creates an illusion of animation.

There is a simple little plugin for this, but you can also write yourself down easily.

http://spritely.net/documentation/

+2
source

All Articles