Execute scriptaculous effect within JS loop

joerocket23

Weaksauce
Joined
Sep 15, 2007
Messages
88
Another question for the evening...

What would be the correct syntax for passing the control variable of a JavaScript loop as an argument of a function?

Code:
for (id=1; id<=5; id++;){
Effect.Fade('[id]', {duration:.6, delay:1});
}

I am trying to loop through IDs 1-5 and apply the Scriptaculous Fade effect to each. I'm not sure what would be the correct syntax for that. Any idea?
 
Back
Top