当前位置: 首页 > news >正文

(3)选择元素——(17)练习(Exercises)

To complete these exercises, you will need the index.htmlfile for this chapter, aswell as the finished JavaScript code as found in complete.js. These files can bedownloaded from the Packt Publishing web site at http://www.packtpub.com/support.

为了完成这些练习,你需要这一章的一个index.html文件,何忧在complete.js中的一根已经完成的js代码。这些文件可以从Packt Publishing 网站:http://ww.packtpub.com/support上下载下来。

Challenge exercises may require use of the official jQuery documentation athttp://api.jquery.com/.
1. Add a class of specialto all of the <li>elements at the second level of thenested 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 theclass 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类。

相关文章:

  • [week4]每周总结与工作计划
  • 每天一道算法_1_放苹果
  • CSS3之渐变Gradient
  • Linux下几个常用的快捷键,真的很实用
  • Python 入门教程 13 ---- Loops
  • 软件开发中的资源控制问题学习
  • linux mount命令学习
  • TCP头分析+面试题
  • Maven--多模块依赖实例解析(五)
  • Python解决codeforces ---- 1
  • HDU 2493 Timer 数学(二分+积分)
  • linux printk函数学习
  • HDU 3262 Seat taking up is tough (模拟搜索)
  • 2014各大网络公司校招笔试算法题(收集并更新中)
  • erlang mnesia 数据库查询
  • (三)从jvm层面了解线程的启动和停止
  • const let
  • JAVA并发编程--1.基础概念
  • php的插入排序,通过双层for循环
  • Python 使用 Tornado 框架实现 WebHook 自动部署 Git 项目
  • SAP云平台里Global Account和Sub Account的关系
  • vue学习系列(二)vue-cli
  • 爱情 北京女病人
  • 记一次用 NodeJs 实现模拟登录的思路
  • 来,膜拜下android roadmap,强大的执行力
  • 前端知识点整理(待续)
  • 微服务框架lagom
  • 微服务入门【系列视频课程】
  • 在Docker Swarm上部署Apache Storm:第1部分
  • 在Unity中实现一个简单的消息管理器
  • JavaScript 新语法详解:Class 的私有属性与私有方法 ...
  • 国内唯一,阿里云入选全球区块链云服务报告,领先AWS、Google ...
  • 回归生活:清理微信公众号
  • 微龛半导体获数千万Pre-A轮融资,投资方为国中创投 ...
  • ​iOS实时查看App运行日志
  • #1014 : Trie树
  • #QT项目实战(天气预报)
  • (9)目标检测_SSD的原理
  • (AtCoder Beginner Contest 340) -- F - S = 1 -- 题解
  • (c语言版)滑动窗口 给定一个字符串,只包含字母和数字,按要求找出字符串中的最长(连续)子串的长度
  • (定时器/计数器)中断系统(详解与使用)
  • (附源码)springboot 校园学生兼职系统 毕业设计 742122
  • (一)Neo4j下载安装以及初次使用
  • (原創) 如何優化ThinkPad X61開機速度? (NB) (ThinkPad) (X61) (OS) (Windows)
  • (转)Sublime Text3配置Lua运行环境
  • (转)Windows2003安全设置/维护
  • (最优化理论与方法)第二章最优化所需基础知识-第三节:重要凸集举例
  • .net 按比例显示图片的缩略图
  • .Net程序帮助文档制作
  • .Net的C#语言取月份数值对应的MonthName值
  • .net反编译的九款神器
  • /run/containerd/containerd.sock connect: connection refused
  • [Android]如何调试Native memory crash issue
  • [C++][数据结构][算法]单链式结构的深拷贝
  • [C++随笔录] 红黑树