From f705a8b09e4c126ef930f8ca0fa32aee8c2d03f3 Mon Sep 17 00:00:00 2001 From: Sunny Thodupunuri Date: Sun, 26 Jun 2016 12:00:21 -0500 Subject: [PATCH] Update jQuery.json Added instructions to use double quotes on jQuery selectors since this is stylistically preferred and FreeCodeCamp's tests don't seem to support double-quote selectors. This change will clarify this issue for learners. Removed escape from quote. Added link in Get Geo-location Data challenge to remind users to use double quotes around selectors. --- challenges/01-front-end-development-certification/jquery.json | 3 ++- .../json-apis-and-ajax.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/challenges/01-front-end-development-certification/jquery.json b/challenges/01-front-end-development-certification/jquery.json index db5730acedf..6092982ecc3 100644 --- a/challenges/01-front-end-development-certification/jquery.json +++ b/challenges/01-front-end-development-certification/jquery.json @@ -80,7 +80,8 @@ "jQuery often selects an HTML element with a selector, then does something to that element.", "For example, let's make all of your button elements bounce. Just add this code inside your document ready function:", "$(\"button\").addClass(\"animated bounce\");", - "Note that we've already included both the jQuery library and the Animate.css library in the background so that you can use them in the editor. So you are using jQuery to apply the Animate.css bounce class to your button elements." + "Note that we've already included both the jQuery library and the Animate.css library in the background so that you can use them in the editor. So you are using jQuery to apply the Animate.css bounce class to your button elements.", + "Additionally make sure to use $(\"button\").addClass(\"animated bounce\"); instead of $('button').addClass(\"animated bounce\"); since single-quote selectors will not pass our tests." ], "challengeSeed": [ "fccss", diff --git a/challenges/01-front-end-development-certification/json-apis-and-ajax.json b/challenges/01-front-end-development-certification/json-apis-and-ajax.json index d64d6f00abb..ccf1334b598 100644 --- a/challenges/01-front-end-development-certification/json-apis-and-ajax.json +++ b/challenges/01-front-end-development-certification/json-apis-and-ajax.json @@ -447,7 +447,8 @@ "You will see a prompt to allow or block this site from knowing your current location. The challenge can be completed either way, as long as the code is correct.", "By selecting allow you will see the text on the output phone change to your latitude and longitude", "Here's some code that does this:", - "
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$(\"#data\").html(\"latitude: \" + position.coords.latitude + \"<br>longitude: \" + position.coords.longitude);
});
}
" + "
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$(\"#data\").html(\"latitude: \" + position.coords.latitude + \"<br>longitude: \" + position.coords.longitude);
});
}
", + "Don't forget to use double quotes around selectors as mentioned here." ], "challengeSeed": [ "fccss",