Is there a good way to make a color loop in javascript?

Here is what I would like to do: I have a line of text in an HTML page. I would like this piece of text to start with the given color, loop though the spectrum, wait a second or two, and then repeat.

I would like to do this in javascript if possible (something like flash is not entirely out of the question, but this will be a large scale slider for this project.)

I know enough JS to know that this is possible, but about that. Can someone point me in the right direction?

And yes, this is a real customer request. I'm just glad that they also did not ask for a blink.;)

+3
source share
3 answers

"" jQuery.animate() . .

+1

, HSB.

:

+4

"" javascript- . , , , .

+2

All Articles