末日的春天
Follow

After following, you can keep track of his dynamic information in a timely manner

Course notes
  • Courses in the relevant section:jQuery traversal prev() method

    prev()中添加选择器, 是在这些紧邻的上一个元素集合中做出进一步筛选, 比如: eq(1), first, last, :contains("3"), has('p'),添加符合你需求的选择器来筛选, 这和next()是一样的,只是二者的功能不一样

    2016-11-170个赞

  • Courses in the relevant section:jQuery traversal each()

    each是一个for循环的包装迭代器 each通过回调的方式处理,并且会有2个固定的实参,索引与元素 each回调方法中的this指向当前迭代的dom元素 $("li").each(function(index, element) { index 索引 0,1 element是对应的li节点 li,li this 指向的是li })

    2016-11-170个赞