jquery - clearInterval(myTimer); for 60sec -


I am trying to clear the interval for 60sec and restart when jquery above 60sec

< / Div>

OK, so here's a shot in the dark, but at the point of saying that you're running this code:

  // run every 1 second word myTimer; Function startTimer () {myTimer = window.setInterval (function () {// your cool code}, 1000); }; StartTimer ();  

So, you can do something like this in your code later (I've been arbitrarily linked to a click event, but it can appear anywhere):

  $ ("# Pause_timer") click (function () {window.clearInterval (myTimer); window.setTimeout (function () {startTimer ();}, 60 * 1000); / 60 Wait second}};);  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -