This assignment will be covering jQuery's $.ajax
, find
, attr
, text
, and css
function.
-
Only code inside the file named script.js. No editing any other files.
-
Using the $.ajax function, get the following url:
https://quarkbackend.com/getfile/karbassi/user-profiles
-
Using the $.ajax
success
function, loop through the response. Do not use a hard coded number in the loop. -
Create a new function that updates one user at a time. Call this new function inside the loop in step 4.
-
This new function should update the elements of the div with the class of
user-profile
. It should:-
Set the user's image.
-
Set the user's first and last name.
-
Set the user's company name and address.
-
Set the user's email address. The email address should be clickable.
-
Set the background color of
.user-profile
to the user's favorite color.
-
Hint: Email address links need to have mailto:
in from of them. E.g: <a href="mailto:person@example.com">person@example.com</a>