当前位置: 首页 > 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 数据库查询
  • Django 博客开发教程 16 - 统计文章阅读量
  • FineReport中如何实现自动滚屏效果
  • JavaScript标准库系列——Math对象和Date对象(二)
  • JavaScript创建对象的四种方式
  • Java知识点总结(JavaIO-打印流)
  • js面向对象
  • Linux链接文件
  • Magento 1.x 中文订单打印乱码
  • node.js
  • nodejs调试方法
  • php的插入排序,通过双层for循环
  • php面试题 汇集2
  • RxJS: 简单入门
  • spring boot下thymeleaf全局静态变量配置
  • tab.js分享及浏览器兼容性问题汇总
  • vue学习系列(二)vue-cli
  • Web Storage相关
  • 电商搜索引擎的架构设计和性能优化
  • 聚簇索引和非聚簇索引
  • 如何正确配置 Ubuntu 14.04 服务器?
  • 手写一个CommonJS打包工具(一)
  • 详解NodeJs流之一
  • 一道面试题引发的“血案”
  • 用Python写一份独特的元宵节祝福
  • 06-01 点餐小程序前台界面搭建
  • ​RecSys 2022 | 面向人岗匹配的双向选择偏好建模
  • ​插件化DPI在商用WIFI中的价值
  • #1014 : Trie树
  • (1)(1.11) SiK Radio v2(一)
  • (android 地图实战开发)3 在地图上显示当前位置和自定义银行位置
  • (AtCoder Beginner Contest 340) -- F - S = 1 -- 题解
  • (Demo分享)利用原生JavaScript-随机数-实现做一个烟花案例
  • (免费领源码)python+django+mysql线上兼职平台系统83320-计算机毕业设计项目选题推荐
  • (七)微服务分布式云架构spring cloud - common-service 项目构建过程
  • (算法)Travel Information Center
  • (学习日记)2024.04.10:UCOSIII第三十八节:事件实验
  • (循环依赖问题)学习spring的第九天
  • (转)视频码率,帧率和分辨率的联系与区别
  • (转)原始图像数据和PDF中的图像数据
  • ***利用Ms05002溢出找“肉鸡