Hi
I know how to use setTimeout, but I'm having a problem with my script
in that I don't really want a function called by the timeout. So I need
a way to insert a brief pause. (I know that theres no direct facility
to do so in javascript, and I don't want to waste cpu time by using a
date and time to do this.)
The situation is that I have an array full of hex codes to change
colors of an div, however I need a delay in order to make it look
right.
A loop adjusts the codes for me,
function fruitLoop()
{
for(i=0;i<=213;i++)
{
//would like a pause here
ook.color = myarray[i]; //adjusts div to another color
}
}
So how do I insert a pause? It should be simple, but I just can't think
of a suitable mechanism.
Any ideas appreciated.
(btw: I read the faq on this, and group posts futher back, but couldn't
find the situation like the one I seem to have, all of them seemed to
be happy with a function call)