{"action":"created","comment":{"url":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/comments/70191526","id":70191526,"diff_hunk":"@@ -1,3 +1,113 @@\n $(document).ready(function(){\n-// Uh oh -- it's saying `$` is undefined! Something's missing from `index.html`...\n+  $(\"#checking .deposit\").on(\"click\", function(evt){\n+    evt.preventDefault();\n+    $(\"#checking .balance.zero\").removeClass(\"zero\");\n+    $(\"#checking .input\").css(\"color\", \"black\");\n+    $(\"#checking .input\").select();\n+    var totalBalance = currentBalance(\"#checking .balance\");\n+    var userInput = currentInput(\"#checking .input\");\n+    var balance = userInput + totalBalance;\n+    $(\"#checking .balance\").html(\"$\" + balance);\n+  })\n+\n+  $(\"#checking .withdraw\").on(\"click\", function(evt){\n+    evt.preventDefault();\n+    $(\"#checking .balance.zero\").removeClass(\"zero\");\n+    $(\"#checking .input\").css(\"color\", \"black\");\n+    $(\"#checking .input\").select();\n+    var totalBalance = currentBalance(\"#checking .balance\");\n+    var userInput = currentInput(\"#checking .input\");\n+    var balance = withdraw(totalBalance, userInput, \"#checking .balance\", \"#checking .input\")\n+    $(\"#checking .balance\").html(\"$\" + balance);\n+  })\n+\n+  $(\"#savings .deposit\").on(\"click\", function(evt){\n+    evt.preventDefault();\n+    $(\"#savings .balance.zero\").removeClass(\"zero\");\n+    $(\"#savings .input\").css(\"color\", \"black\");\n+    $(\"#savings .input\").select();\n+    var totalBalance = currentBalance(\"#savings .balance\");\n+    var userInput = currentInput(\"#savings .input\");\n+    var balance = userInput + totalBalance;\n+    $(\"#savings .balance\").html(\"$\" + balance);\n+  })\n+\n+  $(\"#savings .withdraw\").on(\"click\", function(evt){\n+    evt.preventDefault();\n+    $(\"#savings .input\").css(\"color\", \"black\");\n+    $(\"#savings .input\").select();\n+    var totalBalance = currentBalance(\"#savings .balance\");\n+    var userInput = currentInput(\"#savings .input\");\n+    var balance = withdraw(totalBalance, userInput, \"#savings .balance\", \"#savings .input\");\n+    $(\"#savings .balance\").html(\"$\" + balance);\n+  })\n+\n+  function redTextWarning(location){\n+    $(location).css(\"color\", \"red\");\n+    $(location).val(\"INSUFFICIENT FUNDS!\");\n+    $(location).select();\n+  }\n+\n+  function currentBalance(location){\n+    var displayedBalance = $(location).html();\n+    var totalBalance = parseFloat(displayedBalance.split(\"$\")[1]);\n+    return totalBalance;\n+  }\n+\n+  function currentInput(location){\n+    var amount = $(location).val();\n+    var floatAmount = parseFloat(amount).toFixed(2);\n+    var userInput = parseFloat(floatAmount);\n+    return userInput;\n+  }\n+\n+  function zeroDollars(location){\n+    $(location).addClass(\"zero\");\n+  }\n+","path":"atm.js","position":68,"original_position":68,"commit_id":"7431b92d2a943b71a92e374bd109b11a3952108b","original_commit_id":"7431b92d2a943b71a92e374bd109b11a3952108b","user":{"login":"andrewsunglaekim","id":8976305,"avatar_url":"https://avatars.githubusercontent.com/u/8976305?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewsunglaekim","html_url":"https://github.com/andrewsunglaekim","followers_url":"https://api.github.com/users/andrewsunglaekim/followers","following_url":"https://api.github.com/users/andrewsunglaekim/following{/other_user}","gists_url":"https://api.github.com/users/andrewsunglaekim/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewsunglaekim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewsunglaekim/subscriptions","organizations_url":"https://api.github.com/users/andrewsunglaekim/orgs","repos_url":"https://api.github.com/users/andrewsunglaekim/repos","events_url":"https://api.github.com/users/andrewsunglaekim/events{/privacy}","received_events_url":"https://api.github.com/users/andrewsunglaekim/received_events","type":"User","site_admin":false},"body":"really like this abstraction. How can we do this same sort of thing in the 4 event listeners for the main apps functionality?","created_at":"2016-07-11T00:26:20Z","updated_at":"2016-07-11T00:26:20Z","html_url":"https://github.com/ga-wdi-exercises/atm/pull/139#discussion_r70191526","pull_request_url":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/comments/70191526"},"html":{"href":"https://github.com/ga-wdi-exercises/atm/pull/139#discussion_r70191526"},"pull_request":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/139","id":76739142,"html_url":"https://github.com/ga-wdi-exercises/atm/pull/139","diff_url":"https://github.com/ga-wdi-exercises/atm/pull/139.diff","patch_url":"https://github.com/ga-wdi-exercises/atm/pull/139.patch","issue_url":"https://api.github.com/repos/ga-wdi-exercises/atm/issues/139","number":139,"state":"open","locked":false,"title":"Ben Brizzi atm homework","user":{"login":"brizzi10","id":18674057,"avatar_url":"https://avatars.githubusercontent.com/u/18674057?v=3","gravatar_id":"","url":"https://api.github.com/users/brizzi10","html_url":"https://github.com/brizzi10","followers_url":"https://api.github.com/users/brizzi10/followers","following_url":"https://api.github.com/users/brizzi10/following{/other_user}","gists_url":"https://api.github.com/users/brizzi10/gists{/gist_id}","starred_url":"https://api.github.com/users/brizzi10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brizzi10/subscriptions","organizations_url":"https://api.github.com/users/brizzi10/orgs","repos_url":"https://api.github.com/users/brizzi10/repos","events_url":"https://api.github.com/users/brizzi10/events{/privacy}","received_events_url":"https://api.github.com/users/brizzi10/received_events","type":"User","site_admin":false},"body":"completeness: 4.5\r\ncomfort: 5\r\n\r\nvery close to getting overdraft to work, but everything else is running pretty smooth","created_at":"2016-07-08T11:32:00Z","updated_at":"2016-07-11T00:26:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef023872507d85bd49749bbf18b30c62a4520cb9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/139/commits","review_comments_url":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/139/comments","review_comment_url":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/atm/issues/139/comments","statuses_url":"https://api.github.com/repos/ga-wdi-exercises/atm/statuses/7431b92d2a943b71a92e374bd109b11a3952108b","head":{"label":"brizzi10:master","ref":"master","sha":"7431b92d2a943b71a92e374bd109b11a3952108b","user":{"login":"brizzi10","id":18674057,"avatar_url":"https://avatars.githubusercontent.com/u/18674057?v=3","gravatar_id":"","url":"https://api.github.com/users/brizzi10","html_url":"https://github.com/brizzi10","followers_url":"https://api.github.com/users/brizzi10/followers","following_url":"https://api.github.com/users/brizzi10/following{/other_user}","gists_url":"https://api.github.com/users/brizzi10/gists{/gist_id}","starred_url":"https://api.github.com/users/brizzi10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brizzi10/subscriptions","organizations_url":"https://api.github.com/users/brizzi10/orgs","repos_url":"https://api.github.com/users/brizzi10/repos","events_url":"https://api.github.com/users/brizzi10/events{/privacy}","received_events_url":"https://api.github.com/users/brizzi10/received_events","type":"User","site_admin":false},"repo":{"id":62807827,"name":"atm","full_name":"brizzi10/atm","owner":{"login":"brizzi10","id":18674057,"avatar_url":"https://avatars.githubusercontent.com/u/18674057?v=3","gravatar_id":"","url":"https://api.github.com/users/brizzi10","html_url":"https://github.com/brizzi10","followers_url":"https://api.github.com/users/brizzi10/followers","following_url":"https://api.github.com/users/brizzi10/following{/other_user}","gists_url":"https://api.github.com/users/brizzi10/gists{/gist_id}","starred_url":"https://api.github.com/users/brizzi10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brizzi10/subscriptions","organizations_url":"https://api.github.com/users/brizzi10/orgs","repos_url":"https://api.github.com/users/brizzi10/repos","events_url":"https://api.github.com/users/brizzi10/events{/privacy}","received_events_url":"https://api.github.com/users/brizzi10/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brizzi10/atm","description":"[jquery, javascript, dom, html, css]","fork":true,"url":"https://api.github.com/repos/brizzi10/atm","forks_url":"https://api.github.com/repos/brizzi10/atm/forks","keys_url":"https://api.github.com/repos/brizzi10/atm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brizzi10/atm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brizzi10/atm/teams","hooks_url":"https://api.github.com/repos/brizzi10/atm/hooks","issue_events_url":"https://api.github.com/repos/brizzi10/atm/issues/events{/number}","events_url":"https://api.github.com/repos/brizzi10/atm/events","assignees_url":"https://api.github.com/repos/brizzi10/atm/assignees{/user}","branches_url":"https://api.github.com/repos/brizzi10/atm/branches{/branch}","tags_url":"https://api.github.com/repos/brizzi10/atm/tags","blobs_url":"https://api.github.com/repos/brizzi10/atm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brizzi10/atm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brizzi10/atm/git/refs{/sha}","trees_url":"https://api.github.com/repos/brizzi10/atm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brizzi10/atm/statuses/{sha}","languages_url":"https://api.github.com/repos/brizzi10/atm/languages","stargazers_url":"https://api.github.com/repos/brizzi10/atm/stargazers","contributors_url":"https://api.github.com/repos/brizzi10/atm/contributors","subscribers_url":"https://api.github.com/repos/brizzi10/atm/subscribers","subscription_url":"https://api.github.com/repos/brizzi10/atm/subscription","commits_url":"https://api.github.com/repos/brizzi10/atm/commits{/sha}","git_commits_url":"https://api.github.com/repos/brizzi10/atm/git/commits{/sha}","comments_url":"https://api.github.com/repos/brizzi10/atm/comments{/number}","issue_comment_url":"https://api.github.com/repos/brizzi10/atm/issues/comments{/number}","contents_url":"https://api.github.com/repos/brizzi10/atm/contents/{+path}","compare_url":"https://api.github.com/repos/brizzi10/atm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brizzi10/atm/merges","archive_url":"https://api.github.com/repos/brizzi10/atm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brizzi10/atm/downloads","issues_url":"https://api.github.com/repos/brizzi10/atm/issues{/number}","pulls_url":"https://api.github.com/repos/brizzi10/atm/pulls{/number}","milestones_url":"https://api.github.com/repos/brizzi10/atm/milestones{/number}","notifications_url":"https://api.github.com/repos/brizzi10/atm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brizzi10/atm/labels{/name}","releases_url":"https://api.github.com/repos/brizzi10/atm/releases{/id}","deployments_url":"https://api.github.com/repos/brizzi10/atm/deployments","created_at":"2016-07-07T13:13:50Z","updated_at":"2016-07-07T15:45:33Z","pushed_at":"2016-07-07T20:19:19Z","git_url":"git://github.com/brizzi10/atm.git","ssh_url":"git@github.com:brizzi10/atm.git","clone_url":"https://github.com/brizzi10/atm.git","svn_url":"https://github.com/brizzi10/atm","homepage":"","size":74,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ga-wdi-exercises:master","ref":"master","sha":"d836e5cdad9d205daf6eb75d6d35301ca809170f","user":{"login":"ga-wdi-exercises","id":16946328,"avatar_url":"https://avatars.githubusercontent.com/u/16946328?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-exercises","html_url":"https://github.com/ga-wdi-exercises","followers_url":"https://api.github.com/users/ga-wdi-exercises/followers","following_url":"https://api.github.com/users/ga-wdi-exercises/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-exercises/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-exercises/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-exercises/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-exercises/orgs","repos_url":"https://api.github.com/users/ga-wdi-exercises/repos","events_url":"https://api.github.com/users/ga-wdi-exercises/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-exercises/received_events","type":"Organization","site_admin":false},"repo":{"id":37615907,"name":"atm","full_name":"ga-wdi-exercises/atm","owner":{"login":"ga-wdi-exercises","id":16946328,"avatar_url":"https://avatars.githubusercontent.com/u/16946328?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-exercises","html_url":"https://github.com/ga-wdi-exercises","followers_url":"https://api.github.com/users/ga-wdi-exercises/followers","following_url":"https://api.github.com/users/ga-wdi-exercises/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-exercises/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-exercises/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-exercises/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-exercises/orgs","repos_url":"https://api.github.com/users/ga-wdi-exercises/repos","events_url":"https://api.github.com/users/ga-wdi-exercises/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-exercises/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-wdi-exercises/atm","description":"[jquery, javascript, dom, html, css]","fork":false,"url":"https://api.github.com/repos/ga-wdi-exercises/atm","forks_url":"https://api.github.com/repos/ga-wdi-exercises/atm/forks","keys_url":"https://api.github.com/repos/ga-wdi-exercises/atm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-wdi-exercises/atm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-wdi-exercises/atm/teams","hooks_url":"https://api.github.com/repos/ga-wdi-exercises/atm/hooks","issue_events_url":"https://api.github.com/repos/ga-wdi-exercises/atm/issues/events{/number}","events_url":"https://api.github.com/repos/ga-wdi-exercises/atm/events","assignees_url":"https://api.github.com/repos/ga-wdi-exercises/atm/assignees{/user}","branches_url":"https://api.github.com/repos/ga-wdi-exercises/atm/branches{/branch}","tags_url":"https://api.github.com/repos/ga-wdi-exercises/atm/tags","blobs_url":"https://api.github.com/repos/ga-wdi-exercises/atm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-wdi-exercises/atm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-wdi-exercises/atm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-wdi-exercises/atm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-wdi-exercises/atm/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-wdi-exercises/atm/languages","stargazers_url":"https://api.github.com/repos/ga-wdi-exercises/atm/stargazers","contributors_url":"https://api.github.com/repos/ga-wdi-exercises/atm/contributors","subscribers_url":"https://api.github.com/repos/ga-wdi-exercises/atm/subscribers","subscription_url":"https://api.github.com/repos/ga-wdi-exercises/atm/subscription","commits_url":"https://api.github.com/repos/ga-wdi-exercises/atm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-wdi-exercises/atm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/atm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-wdi-exercises/atm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-wdi-exercises/atm/contents/{+path}","compare_url":"https://api.github.com/repos/ga-wdi-exercises/atm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-wdi-exercises/atm/merges","archive_url":"https://api.github.com/repos/ga-wdi-exercises/atm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-wdi-exercises/atm/downloads","issues_url":"https://api.github.com/repos/ga-wdi-exercises/atm/issues{/number}","pulls_url":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-wdi-exercises/atm/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-wdi-exercises/atm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-wdi-exercises/atm/labels{/name}","releases_url":"https://api.github.com/repos/ga-wdi-exercises/atm/releases{/id}","deployments_url":"https://api.github.com/repos/ga-wdi-exercises/atm/deployments","created_at":"2015-06-17T19:21:59Z","updated_at":"2016-02-26T01:36:41Z","pushed_at":"2016-07-10T02:02:20Z","git_url":"git://github.com/ga-wdi-exercises/atm.git","ssh_url":"git@github.com:ga-wdi-exercises/atm.git","clone_url":"https://github.com/ga-wdi-exercises/atm.git","svn_url":"https://github.com/ga-wdi-exercises/atm","homepage":"","size":602,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":148,"mirror_url":null,"open_issues_count":26,"forks":148,"open_issues":26,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/139"},"html":{"href":"https://github.com/ga-wdi-exercises/atm/pull/139"},"issue":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/issues/139"},"comments":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/ga-wdi-exercises/atm/statuses/7431b92d2a943b71a92e374bd109b11a3952108b"}}}}
{"actor":{"display_login":"andrewsunglaekim"}}