You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: js/lesson5/tutorial.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,14 +69,15 @@ $.ajax({
69
69
3. Update the stored token
70
70
71
71
4. Update remaining attempts and display all guesses
72
-
- If an attempt is not successful, append it to the `$('.attempts')` using a span with the class `wrong`
72
+
- Append each attempt to the `$('.attempts')` using a span
73
+
- If the attempt is successful, include the class `correct` in the span; if it is unsuccessful, include the class `wrong`
73
74
- You can then find out how many wrong attempts there were using `$('.wrong').length+1;`
74
75
75
76
3. On the 7th failure, retrieve the solution using the **GET** request
76
77
77
78
1. Display the solution, hide the input field and allow a user to start a new game
78
79
79
-
4.**Bonus** don't process letters, guesses that have already been attempted or empty space
80
+
4.**Bonus** don't process numbers, guesses that have already been attempted or empty space
80
81
81
82
1. You can use jQuery's `$.isNumeric(character))` to check if a letter is a number
82
83
@@ -99,4 +100,4 @@ This ends our **HTTP Requests, AJAX and APIs** tutorial. Is there something you
99
100
100
101
Now that you are familiar with HTTP requests, AJAX and APIs, how about you go away and create a webpage that pulls in all instagram pictures with a certain hashtag.
101
102
102
-
Or embed a google map onto a webpage with it pointing to a destination of your choice in London.
103
+
Or embed a google map onto a webpage with it pointing to a destination of your choice in London.
0 commit comments