Update JSON

pull/18182/head
benmcmahon100 2015-08-21 20:20:56 +01:00
parent 813d7509a1
commit 4959a23412
2 changed files with 46 additions and 82 deletions

View File

@ -774,7 +774,7 @@
"// \"friends\": [\"everything!\"]", "// \"friends\": [\"everything!\"]",
"// };", "// };",
"", "",
"// ourDog.bark(\"arf!\");", "// ourDog.bark = \"arf!\";",
"// delete(ourDog.tails);", "// delete(ourDog.tails);",
"", "",
"var myDog = {", "var myDog = {",

View File

@ -7,29 +7,42 @@
"title": "Trigger on click Events with jQuery", "title": "Trigger on click Events with jQuery",
"difficulty": 3.19, "difficulty": 3.19,
"description": [ "description": [
"<code>.on('click', function() {</code>", "<code>$(\"#getMessage\").on(\"click\", function(){</code>",
"", "<code>&thinsp;&thinsp;$(\".message\").html(\"Here is the message\");</code>",
"});</code>" "<code>});</code>"
], ],
"tests": [ "tests": [
"assert(editor.match(/\\$\\(\\s?\\\"\\#getMessage\\\"\\s?\\)\\.on\\s?\\(\\s?\\\"click\\\"\\,\\s?function\\s?\\(\\)\\s?\\{/gi), 'You should have bound the click event to the getMessage button')",
"assert(editor.match(/\\$\\(\\s?\\\"\\.message\\\"\\s?\\)\\.html\\(\\s?\\\"Here\\sis\\sthe\\smessage\\\"\\s?\\);/gi), 'You should set te value of the #message box to be the message given in the description')",
"assert(editor.match(/\\}\\);/gi) && editor.match(/\\}\\);/gi).length >= 2, 'Make sure that you close off all of your functions')"
], ],
"challengeSeed": [ "challengeSeed": [
"fccss", "fccss",
" $(document).ready(function() {</code>", " $(document).ready(function() {",
"", " ",
"<code> });</code>", " });",
"fcces", "fcces",
"", "",
"<!-- You shouldn't need to modify code below this line -->", "<!-- You shouldn't need to modify code below this line -->",
"", "",
"<div class=\"container-fluid\">", "<div class=\"container-fluid\">",
" <form action=\"/submit-cat-photo\">", " <div class = \"row text-center\">",
" <label><input type=\"radio\" name=\"indoor-outdoor\"> Indoor</label>", " <h2>Cat Photo Finder</h2>",
" <label><input type=\"radio\" name=\"indoor-outdoor\"> Outdoor</label>", " </div>",
" <input type=\"text\" placeholder=\"cat photo URL\" required>", " <br/>",
" <button type=\"submit\">Submit</button>", " <div class = \"row text-center\">",
" </form>", " <div class = \"col-xs-12 well Message\">",
" The message will go here",
" </div>",
" </div>",
" <br/>",
" <div class = \"row text-center\">",
" <div class = \"col-xs-12\">",
" <button id = \"getMessage\" class = \"btn btn-primary\">",
" Get Message",
" </button>",
" </div>",
" </div>",
"</div>" "</div>"
], ],
"challengeType": 0, "challengeType": 0,
@ -46,68 +59,12 @@
], ],
"tests": [ "tests": [
],
"challengeSeed": [
"fccss",
"catPhotoJSON = [",
" {",
" \"id\": 0,",
" \"imageLink\": \"https://s3.amazonaws.com/freecodecamp/funny-cat.jpg\",",
" \"codeNames\": [",
" \"Juggernaut\",",
" \"Mrs. Wallace\",",
" \"Buttercup\"",
" ]",
" },",
" {",
" \"id\": 1,",
" \"imageLink\": \"https://s3.amazonaws.com/freecodecamp/grumpy-cat.jpg\",",
" \"codeNames\": [",
" \"Oscar\",",
" \"Scrooge\",",
" \"Tyrion\"",
" ]",
" },",
" {",
" \"id\": 2,",
" \"imageLink\": \"https://s3.amazonaws.com/freecodecamp/mischievous-cat.jpg\",",
" \"codeNames\": [",
" \"The Doctor\",",
" \"Loki\",",
" \"Joker\"",
" ]",
" }",
" ]",
"",
"fcces",
"",
"<!-- You shouldn't need to modify code below this line -->",
"",
"<div class=\"container-fluid\">",
" <div class=\"jumbotron\" id=\"output\">",
" </div>",
"</div>"
],
"challengeType": 0,
"type": "waypoint"
},
{
"id": "bad84fee1348bd9aecc58826",
"title": "Read Data from an Element Using jQuery",
"dashedName": "waypoint-read-data-from-an-element-using-jquery",
"difficulty": 3.17,
"description": [
"Let's make everything roll with <code>rollOut</code>."
],
"tests": [
], ],
"challengeSeed": [ "challengeSeed": [
"fccss", "fccss",
" $(document).ready(function() {", " $(document).ready(function() {",
" $(\"button\").on(\"click\", function() {", " $(\"#getMessage\").on(\"click\", function(){",
"", " $(\".message\").html(\"Here is the message\");",
" });", " });",
" });", " });",
"fcces", "fcces",
@ -115,16 +72,23 @@
"<!-- You shouldn't need to modify code below this line -->", "<!-- You shouldn't need to modify code below this line -->",
"", "",
"<div class=\"container-fluid\">", "<div class=\"container-fluid\">",
" <div class=\"row\">", " <div class = \"row text-center\">",
" <div class=\"col-xs-2\">", " <h2>Cat Photo Finder</h2>",
" <input type=\"checkbox\" id=\"check-me\">", " </div>",
" <br/>",
" <div class = \"row text-center\">",
" <div class = \"col-xs-12 well Message\">",
" The message will go here",
" </div>",
" </div>",
" <br/>",
" <div class = \"row text-center\">",
" <div class = \"col-xs-12\">",
" <button id = \"getMessage\" class = \"btn btn-primary\">",
" Get Message",
" </button>",
" </div>", " </div>",
" <div class=\"col-xs-10\">",
" <p>#check-me</p>",
" </div>", " </div>",
" <button class=\"btn btn-block btn-primary\">#click-me</button>",
" <span>Is the checkbox checked?</span>",
" <span id=\"checked-state\"></span>",
"</div>" "</div>"
], ],
"challengeType": 0, "challengeType": 0,