Nice plugin Mike...
On Dec 30, 1:49 pm, "Michael Geary" wrote:
> You can call setTimeout again and keep track of your loop counter, or you
> can use setInterval.
>
> To make that easy, I posted a slowEach() plugin to this group a while back.
> It may be just what you need. Here's the original po
You can call setTimeout again and keep track of your loop counter, or you
can use setInterval.
To make that easy, I posted a slowEach() plugin to this group a while back.
It may be just what you need. Here's the original post:
http://groups.google.com/groups/search?q=sloweach+jquery+plugin
Here
Pause on the server side then.
On Dec 30, 1:18 pm, bwdev wrote:
> Yes but the set TImeout seems to happen once. I need it to pause on
> each interation of the loop.
>
> On Dec 30, 1:05 pm, "Michael Geary" wrote:
>
> > Not only will that lock up the current browser, in many browsers it wil
Yes but the set TImeout seems to happen once. I need it to pause on
each interation of the loop.
On Dec 30, 1:05 pm, "Michael Geary" wrote:
> Not only will that lock up the current browser, in many browsers it will
> lock up *every* browser window or tab. Plus, if someone is running on
> batter
Not only will that lock up the current browser, in many browsers it will
lock up *every* browser window or tab. Plus, if someone is running on
battery power it will drain the battery needlessly.
As Richard said, setTimeout is the right solution:
doSomething();
setTimeout( function() {
If you don't want to lock the browser, use setTimeout
https://developer.mozilla.org/En/DOM/Window.setTimeout
- Richard
On Tue, Dec 30, 2008 at 12:17 PM, Joe wrote:
>
> // Similar to PHP's sleep function.
> function pause(numOfSeconds) {
>
>numOfSeconds *= 1000;
>var startTime = new Dat
// Similar to PHP's sleep function.
function pause(numOfSeconds) {
numOfSeconds *= 1000;
var startTime = new Date().getTime();
while (new Date().getTime() < startTime + numOfSeconds);
return false;
}
// Let's pause for 5 seconds...
pause(5);
console.log('Awake Now');
A simple wa
7 matches
Mail list logo