Jquery Clear / reset .Queue() ?

Posted by Wes on Stack Overflow See other posts from Stack Overflow or by Wes
Published on 2010-05-13T01:21:44Z Indexed on 2010/05/13 1:24 UTC
Read the original article Hit count: 385

Filed under:

I have the following code that triggers two functions whenever a button is clicked. However it only fires the functions once. If i click it again, it does nothing. I need to reset this queue so it fires the functions everytime I click the button.

Also, I'm only doing this so I can delay the functions from be fired 1000ms - is there another way to do this?

$('#play').click(function() { 
// other code..

$(this).delay(1000).queue(function(){ countHourly(); countFlights() });

});

© Stack Overflow or respective owner

Related posts about jQuery