From cff1dc9ba22d1900f9f32f834f8a8e66064396ae Mon Sep 17 00:00:00 2001 From: Kyle Crichton Date: Sun, 27 Nov 2016 21:06:25 -0600 Subject: [PATCH] I got as close as I could. Need to attend office hours --- timers.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/timers.js b/timers.js index fd40910..1a2da36 100644 --- a/timers.js +++ b/timers.js @@ -1,4 +1,34 @@ +$(function () { + var seconds = 0; + var timerId; + function updateTime() { + seconds++; + console.log('start'); + }; + +$('#start').click(function() { + setInterval(seconds, 1000); + $('#timer').text('Time Elapsed: ' + seconds); + + + +}); +$('#pause').click(function() { + clearInterval('#start'); + + +}); +$('#reset').click(function() { + clearInterval('#start'); + $('#timer').text('Stop Watch') + seconds = 0; + + + +}); +updateTime(); +});