Created
April 11, 2014 06:58
-
-
Save susanBuck/10445342 to your computer and use it in GitHub Desktop.
Calculator planning session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Build calculator | |
#wrapper | |
#display / #header / #output | |
.buttons | |
2. CSS Style to look like a calc. | |
3. JS | |
a. click listeners for the buttons | |
b. what # was clicked? Store in a variable | |
c. Put that number in the #display | |
.append(); | |
d. logic each time | |
is it a number? | |
append to the display | |
otherwise is it a equal sign? | |
20 + current display = our final result…display .html() | |
otherwise is it a plus sign? | |
next time clear the display… | |
var running_total | |
<input type=‘hidden’> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment