From 7344b4adb045d7e4b8454609b0329191595b73c2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Sep 2015 20:27:40 -0400 Subject: [PATCH 1/2] fix a bug --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 2b3858a..0007110 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@

One Up

-
This application should add one to the number every time the button is clicked.
+
This application should add one to the number every time the button is clicked. Now here is a change
From 0c1ecdf639fb51a26e1e07794339383702dea257 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Sep 2015 23:26:45 -0400 Subject: [PATCH 2/2] actually fixed a bug --- index.html | 2 +- main.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 0007110..7fe7706 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@

One Up

-
This application should add one to the number every time the button is clicked. Now here is a change
+
This application should add one to the number every time the button is clicked. 
diff --git a/main.js b/main.js index c59af61..b29edfe 100644 --- a/main.js +++ b/main.js @@ -1,10 +1,14 @@ $(function(){ + var num = 0; var oneUp = function(){ - num++; + $('#my-button').click(function() { + num++; + printNum(); + }); }; var printNum = function(){ - var num = 0; $('#output').html(num); }; printNum(); + oneUp(); }); \ No newline at end of file