is there anything like a sleep function in JavaScript ??? Thank you
"The difference between mad and genius is the success"
Hi, Theres a setTimeout function which works similar to a sleep function but you have to call a function when the time elapses... Code: function sleep(maximumtim){ setTimeout('endSleep()',maximumtim); } function endSleep(){ // code at end ; } Call it like this... sleep(5000); will stop for 5 seconds Hope this helps
function sleep(maximumtim){ setTimeout('endSleep()',maximumtim); } function endSleep(){ // code at end ; }
SPREAD THE WORD!!! Are You Lee McCormick? Because I Am Lee M McCormick [email protected] Lee McCormick.com - Live Dynamically Webbed.com - In development but live
Forum Rules