O'Reilly logo

Learning jQuery Third Edition by Karl Swedberg, Jonathan Chaffer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Challenge exercises may require use of the official jQuery documentation at http://api.jquery.com/.

  1. When Charles Dickens is clicked, apply the selected style to it.
  2. When a chapter title (<h3 class="chapter-title">) is double-clicked, toggle the visibility of the chapter text.
  3. When the user presses the right arrow key, cycle to the next body class. The key code for the right arrow key is 39.
  4. Challenge: Use the console.log() function to log the coordinates of the mouse as it moves across any paragraph. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required