Exercises

To complete these exercises, you will need the index.html file for this chapter, as well as the finished JavaScript code as found in complete.js. These files can be downloaded from the Packt Publishing website at http://www.packtpub.com/support.

The challenge exercise may require the use of the official jQuery documentation at http://api.jquery.com/.

  1. Modify the key computation for the first table so that titles and authors are sorted by length rather than alphabetically.
  2. Use the HTML5 data in the second table to compute the sum of all of the book prices, and insert this sum into the heading for that column.
  3. Change the comparator used for the third table so that titles containing the word jQuery come first when sorted by title.
  4. Challenge

Get Learning jQuery - Fourth Edition 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.