{"action":"created","comment":{"url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/comments/43029567","id":43029567,"diff_hunk":"@@ -1 +1,31 @@\n+$(document).ready(createCanvas);\n \n+function createCanvas () {\n+  // Create pixels contained within the div .canvas\n+  for (var i = 0; i < 8000; i++) {\n+    $('.canvas').append(\"<div class=\\\"pixel\\\" id=\\\"\"+i+\"pixel\\\"></div>\");\n+  }\n+  // Click set color button to change the current color to the color input.\n+  $('#setColor').on('click', function(evt) {\n+    evt.preventDefault();\n+    // Set lastColor 2 to lastColor1 color\n+    $('#lastColor2').css('background-color', $('#lastColor1').css('background-color'));\n+    // Set lastColor 1 to previous color\n+    $('#lastColor1').css('background-color', $('#brushColor').css('background-color'));\n+    // Set current color to color input\n+    var newColor = $('#colorInput').val()\n+    $('#brushColor').css('background-color', newColor);\n+  });\n+  // Click recently used colors to change brushColor to that color\n+  $('#lastColor1').on('click', function() {\n+    $('#brushColor').css('background-color', $(this).css('background-color'));\n+  });\n+  $('#lastColor2').on('click', function() {","path":"pixart.js","position":23,"original_position":23,"commit_id":"a000ced46be53fc4c5db7c034d662404717d1c6a","original_commit_id":"a000ced46be53fc4c5db7c034d662404717d1c6a","user":{"login":"amaseda","id":3519147,"avatar_url":"https://avatars.githubusercontent.com/u/3519147?v=3","gravatar_id":"","url":"https://api.github.com/users/amaseda","html_url":"https://github.com/amaseda","followers_url":"https://api.github.com/users/amaseda/followers","following_url":"https://api.github.com/users/amaseda/following{/other_user}","gists_url":"https://api.github.com/users/amaseda/gists{/gist_id}","starred_url":"https://api.github.com/users/amaseda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaseda/subscriptions","organizations_url":"https://api.github.com/users/amaseda/orgs","repos_url":"https://api.github.com/users/amaseda/repos","events_url":"https://api.github.com/users/amaseda/events{/privacy}","received_events_url":"https://api.github.com/users/amaseda/received_events","type":"User","site_admin":false},"body":"Thinking ahead: is there a way you can create a single event listener for all swatches that will handle setting the brush color?","created_at":"2015-10-26T18:02:07Z","updated_at":"2015-10-26T18:02:07Z","html_url":"https://github.com/ga-dc/pixart_js/pull/148#discussion_r43029567","pull_request_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/148","_links":{"self":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/comments/43029567"},"html":{"href":"https://github.com/ga-dc/pixart_js/pull/148#discussion_r43029567"},"pull_request":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/148"}}},"pull_request":{"url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/148","id":48659686,"html_url":"https://github.com/ga-dc/pixart_js/pull/148","diff_url":"https://github.com/ga-dc/pixart_js/pull/148.diff","patch_url":"https://github.com/ga-dc/pixart_js/pull/148.patch","issue_url":"https://api.github.com/repos/ga-dc/pixart_js/issues/148","number":148,"state":"open","locked":false,"title":"Pixart - Jordan Brauner's Solution","user":{"login":"jordanbrauner","id":9307777,"avatar_url":"https://avatars.githubusercontent.com/u/9307777?v=3","gravatar_id":"","url":"https://api.github.com/users/jordanbrauner","html_url":"https://github.com/jordanbrauner","followers_url":"https://api.github.com/users/jordanbrauner/followers","following_url":"https://api.github.com/users/jordanbrauner/following{/other_user}","gists_url":"https://api.github.com/users/jordanbrauner/gists{/gist_id}","starred_url":"https://api.github.com/users/jordanbrauner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordanbrauner/subscriptions","organizations_url":"https://api.github.com/users/jordanbrauner/orgs","repos_url":"https://api.github.com/users/jordanbrauner/repos","events_url":"https://api.github.com/users/jordanbrauner/events{/privacy}","received_events_url":"https://api.github.com/users/jordanbrauner/received_events","type":"User","site_admin":false},"body":"Comfort: 4\r\nCompleteness: 5","created_at":"2015-10-24T16:40:11Z","updated_at":"2015-10-26T18:02:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3cdcf71065a57cb3c32dd9caa17d0a5f6626808f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/148/commits","review_comments_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/148/comments","review_comment_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-dc/pixart_js/issues/148/comments","statuses_url":"https://api.github.com/repos/ga-dc/pixart_js/statuses/a000ced46be53fc4c5db7c034d662404717d1c6a","head":{"label":"jordanbrauner:jordanbrauner-solution","ref":"jordanbrauner-solution","sha":"a000ced46be53fc4c5db7c034d662404717d1c6a","user":{"login":"jordanbrauner","id":9307777,"avatar_url":"https://avatars.githubusercontent.com/u/9307777?v=3","gravatar_id":"","url":"https://api.github.com/users/jordanbrauner","html_url":"https://github.com/jordanbrauner","followers_url":"https://api.github.com/users/jordanbrauner/followers","following_url":"https://api.github.com/users/jordanbrauner/following{/other_user}","gists_url":"https://api.github.com/users/jordanbrauner/gists{/gist_id}","starred_url":"https://api.github.com/users/jordanbrauner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordanbrauner/subscriptions","organizations_url":"https://api.github.com/users/jordanbrauner/orgs","repos_url":"https://api.github.com/users/jordanbrauner/repos","events_url":"https://api.github.com/users/jordanbrauner/events{/privacy}","received_events_url":"https://api.github.com/users/jordanbrauner/received_events","type":"User","site_admin":false},"repo":{"id":44627907,"name":"pixart_js","full_name":"jordanbrauner/pixart_js","owner":{"login":"jordanbrauner","id":9307777,"avatar_url":"https://avatars.githubusercontent.com/u/9307777?v=3","gravatar_id":"","url":"https://api.github.com/users/jordanbrauner","html_url":"https://github.com/jordanbrauner","followers_url":"https://api.github.com/users/jordanbrauner/followers","following_url":"https://api.github.com/users/jordanbrauner/following{/other_user}","gists_url":"https://api.github.com/users/jordanbrauner/gists{/gist_id}","starred_url":"https://api.github.com/users/jordanbrauner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordanbrauner/subscriptions","organizations_url":"https://api.github.com/users/jordanbrauner/orgs","repos_url":"https://api.github.com/users/jordanbrauner/repos","events_url":"https://api.github.com/users/jordanbrauner/events{/privacy}","received_events_url":"https://api.github.com/users/jordanbrauner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jordanbrauner/pixart_js","description":"Use JS events and programmatically generated DOM elements to build a drawing application. [javascript, dom]","fork":true,"url":"https://api.github.com/repos/jordanbrauner/pixart_js","forks_url":"https://api.github.com/repos/jordanbrauner/pixart_js/forks","keys_url":"https://api.github.com/repos/jordanbrauner/pixart_js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jordanbrauner/pixart_js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jordanbrauner/pixart_js/teams","hooks_url":"https://api.github.com/repos/jordanbrauner/pixart_js/hooks","issue_events_url":"https://api.github.com/repos/jordanbrauner/pixart_js/issues/events{/number}","events_url":"https://api.github.com/repos/jordanbrauner/pixart_js/events","assignees_url":"https://api.github.com/repos/jordanbrauner/pixart_js/assignees{/user}","branches_url":"https://api.github.com/repos/jordanbrauner/pixart_js/branches{/branch}","tags_url":"https://api.github.com/repos/jordanbrauner/pixart_js/tags","blobs_url":"https://api.github.com/repos/jordanbrauner/pixart_js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jordanbrauner/pixart_js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jordanbrauner/pixart_js/git/refs{/sha}","trees_url":"https://api.github.com/repos/jordanbrauner/pixart_js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jordanbrauner/pixart_js/statuses/{sha}","languages_url":"https://api.github.com/repos/jordanbrauner/pixart_js/languages","stargazers_url":"https://api.github.com/repos/jordanbrauner/pixart_js/stargazers","contributors_url":"https://api.github.com/repos/jordanbrauner/pixart_js/contributors","subscribers_url":"https://api.github.com/repos/jordanbrauner/pixart_js/subscribers","subscription_url":"https://api.github.com/repos/jordanbrauner/pixart_js/subscription","commits_url":"https://api.github.com/repos/jordanbrauner/pixart_js/commits{/sha}","git_commits_url":"https://api.github.com/repos/jordanbrauner/pixart_js/git/commits{/sha}","comments_url":"https://api.github.com/repos/jordanbrauner/pixart_js/comments{/number}","issue_comment_url":"https://api.github.com/repos/jordanbrauner/pixart_js/issues/comments{/number}","contents_url":"https://api.github.com/repos/jordanbrauner/pixart_js/contents/{+path}","compare_url":"https://api.github.com/repos/jordanbrauner/pixart_js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jordanbrauner/pixart_js/merges","archive_url":"https://api.github.com/repos/jordanbrauner/pixart_js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jordanbrauner/pixart_js/downloads","issues_url":"https://api.github.com/repos/jordanbrauner/pixart_js/issues{/number}","pulls_url":"https://api.github.com/repos/jordanbrauner/pixart_js/pulls{/number}","milestones_url":"https://api.github.com/repos/jordanbrauner/pixart_js/milestones{/number}","notifications_url":"https://api.github.com/repos/jordanbrauner/pixart_js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jordanbrauner/pixart_js/labels{/name}","releases_url":"https://api.github.com/repos/jordanbrauner/pixart_js/releases{/id}","created_at":"2015-10-20T18:52:19Z","updated_at":"2015-10-20T18:52:20Z","pushed_at":"2015-10-24T16:39:13Z","git_url":"git://github.com/jordanbrauner/pixart_js.git","ssh_url":"git@github.com:jordanbrauner/pixart_js.git","clone_url":"https://github.com/jordanbrauner/pixart_js.git","svn_url":"https://github.com/jordanbrauner/pixart_js","homepage":"","size":92,"stargazers_count":0,"watchers_count":0,"language":"HTML","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-dc:master","ref":"master","sha":"2f481206df5f6ef20010c2b2cd4789bf503fc75e","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":34754821,"name":"pixart_js","full_name":"ga-dc/pixart_js","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/pixart_js","description":"Use JS events and programmatically generated DOM elements to build a drawing application. [javascript, dom]","fork":false,"url":"https://api.github.com/repos/ga-dc/pixart_js","forks_url":"https://api.github.com/repos/ga-dc/pixart_js/forks","keys_url":"https://api.github.com/repos/ga-dc/pixart_js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/pixart_js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/pixart_js/teams","hooks_url":"https://api.github.com/repos/ga-dc/pixart_js/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/pixart_js/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/pixart_js/events","assignees_url":"https://api.github.com/repos/ga-dc/pixart_js/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/pixart_js/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/pixart_js/tags","blobs_url":"https://api.github.com/repos/ga-dc/pixart_js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/pixart_js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/pixart_js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/pixart_js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/pixart_js/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/pixart_js/languages","stargazers_url":"https://api.github.com/repos/ga-dc/pixart_js/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/pixart_js/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/pixart_js/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/pixart_js/subscription","commits_url":"https://api.github.com/repos/ga-dc/pixart_js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/pixart_js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/pixart_js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/pixart_js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/pixart_js/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/pixart_js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/pixart_js/merges","archive_url":"https://api.github.com/repos/ga-dc/pixart_js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/pixart_js/downloads","issues_url":"https://api.github.com/repos/ga-dc/pixart_js/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/pixart_js/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/pixart_js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/pixart_js/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/pixart_js/releases{/id}","created_at":"2015-04-28T20:41:44Z","updated_at":"2015-07-21T13:56:54Z","pushed_at":"2015-10-26T03:30:03Z","git_url":"git://github.com/ga-dc/pixart_js.git","ssh_url":"git@github.com:ga-dc/pixart_js.git","clone_url":"https://github.com/ga-dc/pixart_js.git","svn_url":"https://github.com/ga-dc/pixart_js","homepage":"","size":1856,"stargazers_count":6,"watchers_count":6,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":151,"mirror_url":null,"open_issues_count":31,"forks":151,"open_issues":31,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/148"},"html":{"href":"https://github.com/ga-dc/pixart_js/pull/148"},"issue":{"href":"https://api.github.com/repos/ga-dc/pixart_js/issues/148"},"comments":{"href":"https://api.github.com/repos/ga-dc/pixart_js/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/ga-dc/pixart_js/statuses/a000ced46be53fc4c5db7c034d662404717d1c6a"}}}}