Merge pull request #9391 from sthodup1/fix/jQueryProperStyle
Fix Get Geolocation Data - jQuery Selector
This commit is contained in:
@ -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",
|
||||
|
@ -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 + \"<br>longitude: \" + position.coords.longitude);<br> });<br>}</blockquote>"
|
||||
"<blockquote>if (navigator.geolocation) {<br> navigator.geolocation.getCurrentPosition(function(position) {<br> $(\"#data\").html(\"latitude: \" + position.coords.latitude + \"<br>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",
|
||||
|
Reference in New Issue
Block a user