Chapter 8. A Change in the Weather

"Climate is what we expect, weather is what we get."

– Mark Twain

In this chapter, we will build a weather widget to learn about using Ajax to load content asynchronously and communicate with web services. We will learn about Ajax and how to use jQuery's Ajax methods to load files that contain XML or JSON formatted data. Then we will get the weather conditions from a web service to display in the widget. We will also use the HTML Geolocation API to find the user's location so we can show their local weather.

We will learn the following in this chapter:

  • How to get XML and JSON data using jQuery' Ajax methods
  • Parsing JSON versus XML returned from services
  • What web services are and how to communicate with them asynchronously ...

Get HTML5 Web Application Development By Example Beginner's guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.