Posted By

tomdowning on 09/21/11


Tagged


Versions (?)

Javascript timer


 / Published in: JavaScript
 

  1. function startTimer() {
  2. intervalID = setInterval("timerFired()", 5000);
  3. }
  4. timerFired = function() {
  5. //do something
  6. }
  7. function stopTimer() {
  8. clearInterval(intervalID);
  9. }

Report this snippet  

You need to login to post a comment.