Duration: 18:55 min
Summary: In this lesson, we will talk about Ajax calls. We will be using the $.ajax jQuery function to retrieve some weather information. When it comes to Ajax calls, it is important for us to understand the concept of ‘now’ and ‘later’. ‘Now’ is when we make the ajax call, and ‘later’ is the few milliseconds later when the call is complete and we need to read the data that the service returns. We will be using the callback function that takes a parameter that represents the data we got back from the service. We will set all the properties that we data (data, data type, URL…) and once we get the data back from the service, we will display it in a stringified format in the textarea.