I\'m trying to pause and then play a setInterval loop.
setInterval
After I have stopped the loop, the \"start\" button in my attempt doesn\'t seem to work :
(function(){ var i = 0; function stop(){ clearTimeout(i); } function start(){ i = setTimeout( timed, 1000 ); } function timed(){ document.getElementById("input").value++; start(); } window.stop = stop; window.start = start; })()
http://jsfiddle.net/TE3Z2/