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.
pull/18182/head
Sunny Thodupunuri 2016-06-26 12:00:21 -05:00 committed by Sunny
parent 6c4293b1dd
commit f705a8b09e
2 changed files with 4 additions and 2 deletions

View File

@ -80,7 +80,8 @@
"jQuery often selects an HTML element with a <code>selector</code>, then does something to that element.",
"For example, let's make all of your <code>button</code> elements bounce. Just add this code inside your document ready function:",
"<code>$(\"button\").addClass(\"animated bounce\");</code>",
"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 <code>bounce</code> class to your <code>button</code> 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 <code>bounce</code> class to your <code>button</code> elements.",
"Additionally make sure to use <code>$(\"button\").addClass(\"animated bounce\");</code> instead of <code>$('button').addClass(\"animated bounce\");</code> since single-quote selectors will not pass our tests."
],
"challengeSeed": [
"fccss",

View File

@ -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:",
"<blockquote>if (navigator.geolocation) {<br> navigator.geolocation.getCurrentPosition(function(position) {<br> $(\"#data\").html(\"latitude: \" + position.coords.latitude + \"&lt;br&gt;longitude: \" + position.coords.longitude);<br> });<br>}</blockquote>"
"<blockquote>if (navigator.geolocation) {<br> navigator.geolocation.getCurrentPosition(function(position) {<br> $(\"#data\").html(\"latitude: \" + position.coords.latitude + \"&lt;br&gt;longitude: \" + position.coords.longitude);<br> });<br>}</blockquote>",
"Don't forget to use double quotes around selectors as mentioned <a href='/challenges/target-html-elements-with-selectors-using-jquery'>here.</a>"
],
"challengeSeed": [
"fccss",