diff --git a/timers.js b/timers.js index fd40910..ede31ba 100644 --- a/timers.js +++ b/timers.js @@ -1,4 +1,22 @@ +$(function() { +var seconds = i; +var timerId = "Time elapsed" + seconds; + + $('#start').on('click', function(){ + var updateTime = function() { + timerId = setInterval(updateTime, 1000); + + $('#timer').text(timerId); + }; + updateTime(); + }); + + $('#reset').on('click', function(){ + $('#timer').text('Stop Watch'); + }); + +});