Sorry about that, I was writing from memory and got the 'what' and the 'when' the wrong way round! Correct format for setTimeout is ...
var timeout = setTimeout ( script-to-execute, time-in-milliseconds ); ... so just swap the 2000 and the function around. Apologies. On Oct 11, 1:55 am, "Michael Geary" <[EMAIL PROTECTED]> wrote: > You have the arguments to setTimeout reversed. > > setTimeout is a browser function, not a jQuery function. Just Google for > javascript settimeout and you'll find it. > > -Mike > > > From: marc0047 > > > Thanks, 'setTimeout' gives me a big jump start! > > > However, I had a little trouble getting it to work: Firebug > > is warning me that setTimeout is possibly missing quotes and > > arguments, but I'm pretty sure I followed your example > > exactly. The following setup has the yellow box (#box1) > > performing the opacity change, but the blue box > > (#box2) is getting an error: > > > $('#box1').animate({opacity: 0.1}, 1000); > > > setTimeout(2000, function() { > > $('#box2').animate({left: '200px'}, 5000); } ); > > > Also, I had a hard time finding documentation for setTimeout > > in jQuery docs. Anyone know the exact url to the documentation? > > > Thanks! > > Marc