To complete these exercises, you will need the index.htmlfile 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.
http://ww.packtpub.com
Challenge exercises may require use of the official jQuery documentation at http://api.jquery.com/.
1. Add a class of specialto all of the <li>elements at the second level of the nested list.
2. Add a class of yearto all of the table cells in the third column of a table.
3. Add the class specialto the first table row that has the word Tragedyin it.
4. Challenge: Select all of the list items (<li>s) containing a link (<a>). Add the class afterlinkto the sibling list items that follow the ones selected.
5. Challenge: Add the class tragedyto the closest ancestor <ul>of any .pdflink.
這些富有挑戰的練習可能需要使用http://api.jquery.com的官方jquery文檔。1、為所有嵌套列表的第二層級的li元素添加一個special類。2、為所有在表格中的第三列的方格加上一個year類。3、為表格的含有Tragedy單詞的第一行家還是那個一個special類4、挑戰:選擇所有的含有連結(a)的清單項目(li)。為選擇的這些元素的後面的兄弟列表節點添加一個afterlink類。5、挑戰:為所有.pdf連結的最近的祖先ul元素添加一個tragedy類。