diff --git a/index.html b/index.html index 2b3858a..7fe7706 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@
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.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