Hey all,

I was reading up on this javascript tutorial:
http://www.switchonthecode.com/tutor...ccordion-menus
Basically, it shows you how to create an accordion using pure javascript, not jquery. All made sense to me until the actual part of tracking the animation. He says "Because of all that, the first thing we do in the animation function is figure out how much time has passed since the last animation iteration."
Basically all my confusion is in this line:
Code:
Code:
setTimeout("animate(" + new Date().getTime() + "," + TimeToSlide + ",'" 
+ openAccordion + "','" + nID + "')", 33);
I'm thinking that setTimeout waits 33 milliseconds and then calls the animate() function, which passes the current time. I was told I'm misinterpreting this.
I just don't understand what is meant by "new Date().getTime() is evaluated at timeout-setting time, not at timeout-calling time."
Also what is meant by the "last animation iteration"?
I been trying to understand this for a couple days. Thanks for any response.