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 the use of the official jQuery documentation at http://api.jquery.com/.
- When Charles Dickens is clicked, apply the
selected
style to it. - When a chapter title (
<h3 class="chapter-title">
) is double-clicked, toggle the visibility of the chapter text. - When the user presses the right arrow key, cycle to the next
body
class. The key code for the right arrow key is39
. - Challenge: Use the
console.log()
function to log the coordinates of the mouse as it moves across any paragraph. ...
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.