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.j s. These files can be downloaded from the Packt Publishing web site at http://www.packtpub.com/support.

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

  1. Add a class of special to all of the <li> elements at the second level of the nested list.
  2. Add a class of year to all of the table cells in the third column of a table.
  3. Add the class special to the first table row that has the word Tragedy in it.
  4. Challenge: Select all of the list items (<li>s) containing a link (<a>). Add the class afterlink to the sibling list items that follow the ones selected. ...

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