
Learning jQuery - Fourth Edition

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 web site at http://www.packtpub.com/support.
Challenge exercises may require the use of the official jQuery documentation at http://api.jquery.com/:
Add a class of special
to all of the <li>
elements at the second level of the nested list.
Add a class of year
to all the table cells in the third column of a table.
Add the class special
to the first table row that has the word Tragedy in it.
Challenge: Select all the list items (<li>s
) containing a link (<a>
). Add the class afterlink
to the sibling list items that follow the ones selected.
Challenge: Add the class tragedy
to the closest ancestor <ul>
of any .pdf
link.
Change the font size
Change margin width
Change background colour