wdi-hk-10 / lab-js-ajax

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Practicing AJAX

Introduction

Note: This can be a pair programming activity or done independently.

You're about to write a lot of AJAX-backed JavaScript – using either jQuery or Vanilla JS, if you're feeling confident – that will complete our little Doughnut Shop app.

Make use of the fantastic and delicious https://api.doughnuts.ga. Your task is to use your JS skills to list out all the doughnuts in our database and get our form working so we can add more.

Note: Keep in mind, this API doesn't persist (so that other students can use it, too), but it does act like it. When you create a new doughnut, it'll show you results as if that doughnut was persisted. Make use of it!

Exercise

Requirements

  • Implement a jQuery AJAX client for a simple REST service
  • Get all doughnuts and append them to #doughnuts
  • Create a doughnut using the form #new-doughnut
  • Update a doughnut using the form #edit-doughnut inside modal provided
  • Destroy a doughnut

Starter Code

The starter code is very similar to the lesson. However, please fork this repo and start fresh from this one.

Deliverable

Make a list of existing doughnuts underneath the form, make the form work, and then, build your app to add to the list of donuts - using the information from newly created donuts - without refreshing the page.

Additional Resources

About


Languages

Language:HTML 72.5%Language:CSS 27.0%Language:JavaScript 0.5%