muhanma / jquery-assignment-2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQuery Assignment #2

This assignment will be covering jQuery's $.ajax, find, attr, text, and css function.

Assignment

  1. Fork this repo.

  2. Only code inside the file named script.js. No editing any other files.

  3. Using the $.ajax function, get the following url: https://quarkbackend.com/getfile/karbassi/user-profiles

  4. Using the $.ajax success function, loop through the response. Do not use a hard coded number in the loop.

  5. Create a new function that updates one user at a time. Call this new function inside the loop in step 4.

  6. 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>

The HTML page should produce an image like so:

output

About


Languages

Language:HTML 95.9%Language:JavaScript 3.7%Language:CSS 0.4%