jQuery基础教程-第2章练习
2013-02-18 17:58
148 查看
02.js
$(document).ready(function() { //Find the 2nd li add the "special" class //Answer 1 $('li').children().find('li').addClass('special'); //Find the 3nd cell add the "year" class //Answer 2 $('tr').find('td:eq(2)').addClass('year'); //Find first line of text containing "Tragedy" add the the "special" class //Answer 3 $('td:contains(Tragedy)').first().parent().addClass('special'); //Answer 4 //$('a').parent().nextAll().addClass('afterlink'); $('li').not('a').addClass('afterlink'); //Answer $('a[href$=".pdf"]').closest('ul').addClass('tragedy'); });
相关文章推荐
- Java - Thinking in Java 第2章 练习
- C Primer Plus 编程练习代码——第2章
- Java编程思想 第4版 练习题 / 第2章 一切都是对象 / 练习1
- 《Python3程序开发指南(第二版)》第2章 数据类型 练习
- C++ Primer Plus 第2章 编程练习
- Android编程权威指南(第2版)—第2章挑战练习
- 第2章 关系数据库 练习
- 《编译原理-龙书》练习第2章
- c++primer plus 第六版 第2章 编程练习之路
- 《快学Scala》第2章 控制结构和函数 练习
- 第2章_基本数据类型和基本操作_编程练习Exercise2.11通过控制台进行大小写的切换
- C++ Primer Plus(第六版)编程练习 第2章 开始学习C++
- 第2章_基本数据类型和基本操作_编程练习Exercise2.7通过创建窗口进行大小写的切换
- 【Oracle练习】①第2章 编写简单的查询语句
- 学习笔记:《jQuery基础教程》第四版第二章课后练习
- Java编程思想 第4版 练习题 / 第2章 一切都是对象 / 练习3
- 裴礼文数学分析中的典型问题与方法第2章一元函数的连续性练习
- Accelerated C++:通过示例进行编程实践——练习解答(第2章)
- 《火球——UML大战需求分析》(第2章 耗尽脑汁的需求分析工作)——2.5 小结与练习
- 学习笔记:《jQuery基础教程》第四版第三章课后练习