Update JSON
parent
813d7509a1
commit
4959a23412
|
@ -774,7 +774,7 @@
|
|||
"// \"friends\": [\"everything!\"]",
|
||||
"// };",
|
||||
"",
|
||||
"// ourDog.bark(\"arf!\");",
|
||||
"// ourDog.bark = \"arf!\";",
|
||||
"// delete(ourDog.tails);",
|
||||
"",
|
||||
"var myDog = {",
|
||||
|
|
|
@ -7,29 +7,42 @@
|
|||
"title": "Trigger on click Events with jQuery",
|
||||
"difficulty": 3.19,
|
||||
"description": [
|
||||
"<code>.on('click', function() {</code>",
|
||||
"",
|
||||
"});</code>"
|
||||
"<code>$(\"#getMessage\").on(\"click\", function(){</code>",
|
||||
"<code>  $(\".message\").html(\"Here is the message\");</code>",
|
||||
"<code>});</code>"
|
||||
],
|
||||
"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": [
|
||||
"fccss",
|
||||
" $(document).ready(function() {</code>",
|
||||
"",
|
||||
"<code> });</code>",
|
||||
" $(document).ready(function() {",
|
||||
" ",
|
||||
" });",
|
||||
"fcces",
|
||||
"",
|
||||
"<!-- You shouldn't need to modify code below this line -->",
|
||||
"",
|
||||
"<div class=\"container-fluid\">",
|
||||
" <form action=\"/submit-cat-photo\">",
|
||||
" <label><input type=\"radio\" name=\"indoor-outdoor\"> Indoor</label>",
|
||||
" <label><input type=\"radio\" name=\"indoor-outdoor\"> Outdoor</label>",
|
||||
" <input type=\"text\" placeholder=\"cat photo URL\" required>",
|
||||
" <button type=\"submit\">Submit</button>",
|
||||
" </form>",
|
||||
" <div class = \"row text-center\">",
|
||||
" <h2>Cat Photo Finder</h2>",
|
||||
" </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>"
|
||||
],
|
||||
"challengeType": 0,
|
||||
|
@ -46,68 +59,12 @@
|
|||
],
|
||||
"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": [
|
||||
"fccss",
|
||||
" $(document).ready(function() {",
|
||||
" $(\"button\").on(\"click\", function() {",
|
||||
"",
|
||||
" $(\"#getMessage\").on(\"click\", function(){",
|
||||
" $(\".message\").html(\"Here is the message\");",
|
||||
" });",
|
||||
" });",
|
||||
"fcces",
|
||||
|
@ -115,16 +72,23 @@
|
|||
"<!-- You shouldn't need to modify code below this line -->",
|
||||
"",
|
||||
"<div class=\"container-fluid\">",
|
||||
" <div class=\"row\">",
|
||||
" <div class=\"col-xs-2\">",
|
||||
" <input type=\"checkbox\" id=\"check-me\">",
|
||||
" </div>",
|
||||
" <div class=\"col-xs-10\">",
|
||||
" <p>#check-me</p>",
|
||||
" </div>",
|
||||
" <button class=\"btn btn-block btn-primary\">#click-me</button>",
|
||||
" <span>Is the checkbox checked?</span>",
|
||||
" <span id=\"checked-state\"></span>",
|
||||
" <div class = \"row text-center\">",
|
||||
" <h2>Cat Photo Finder</h2>",
|
||||
" </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>"
|
||||
],
|
||||
"challengeType": 0,
|
||||
|
|
Loading…
Reference in New Issue