lawrence wrote:
> "Stephen Chalmers" <> wrote in message
>
> Also, I'm used to PHP syntax, so this surprise me:
>
>> if(elem) //all expected divs available
>> moveDivs();
>> else
>> alert('Cannot find div called todd'+i+'
' );
>> }
>
> Does it work just as well if I go:
>
> if(elem) {
> moveDivs();
> } else {
> alert('Cannot find div called todd'+i+'
' );
> }
> }
Yes, of course. Why do you not just RTFM and/or try it?
> Also, I notice that changing the time on the setTimeout doesn't seem
> to speed things up. When I change the 100 to a 10, things seem nearly
> the same. How can that be?
The maximum resolution for a timeout or interval is restricted to
the system timer's resolution. However, you most certainly stumble
over the fact that the numbers mean *milliseconds* (1/1000 of a
second), not seconds. Human perception usually is too slow to
note the difference between these spans of time.
>> setTimeout("moveDivs()", 100);
>
> Sorry for all the dumb questions.
There are no dumb questions, just not thoughtfully enough asked ones.
As for you, many of your questions would have been answered by
reading a decent manual. You have done that when learning PHP, have
you not?
> I'm sure 3 months from now I'll look back on this script and wince at
> my own stupidity.
Probably.
PointedEars