Created
November 26, 2013 22:42
-
-
Save dahngeek/7667635 to your computer and use it in GitHub Desktop.
Hacer algo cada n segundos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var timerId = setInterval(function() { | |
// clo que quieres quie se ejecute cada n segundos | |
}, 1000); | |
// 1 second = 1000 milliseconds. | |
//Cuando quieras que se detenga de realizarlo solo le das clear interval: | |
clearInterval(timerId); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment