Hi,
I was wanting to create a JavaScript function in which I could tell the script to wail or sleep, such as
Code:
function sleepNow(time)
{
//sleep for time
}
With this, I could then call it at any point in the script, such as
Code:
sleepNow(4000);
or
Code:
<input type="button" onclick="sleepNow(1000);">
Is this possible?
I would prefer it to be just JavaScript, but I do not mind other JavaScript libraries such as jQuery.
Thanks in advance