Jump to content

Clear (Empty/Flush) Ajax Event Queue - How ?


andyhill

Recommended Posts

When many Ajax Events are in the queue and each one when run takes time, I decide based on a particular user action at runtime I no longer want the remaining unrun queued events to run, I therefore need to STOP AND REMOVE ALL QUEUED EVENTS (DELETE).

 

eg.

 

while (!q.isEmpty()) 
{
    q.dequeue();
}

 

$(selector).clearQueue(queueName)

 

var stack = [];
//put value on top of stack
stack.push(1);
//remove value from top of stack
var value = stack.pop();

 

var queue = [];
//put value on end of queue
queue
.push(1);
//Take first value from queue
var value = queue.shift();

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...