View Full Version : Two functions in a setTimeout??
Jen-
Apr 11th 2007, 1:09 am
Hello, can two functions go into a set timeout? If so how does it look and will it switch back and forth between the two functions after so much time? Please let me know, Thank you...
setTimeout('one()','two()',3000)????????
giraph
Apr 11th 2007, 9:23 am
umm you can do...
setTimeout('one()', 3000);
function one()
{
setTimeout('two()', 3000);
//your code etc
}
function two()
{
setTimeout('one()', 3000);
//your code etc
}
to get the affect of switching back and forth between them every 3 seconds.
Jen-
Apr 11th 2007, 4:41 pm
Whoa, hadn't thought of that, didn't know you could do that, I'll try it thanks!
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.