jQuery 筛选器2

// 由于$()只能输入字符串$('#li:eq(1)'),可通过.eq()来传入。
// 获取this标签中的指定属性
$(this).eq(1)

// 获取第一个元素
$(this).first()    

// 获取最后一个元素
$(this).last()        

// 检查当前元素是否含有某个特定类,有返回true,没有false。
$(this).hasClass(class)

 

相关文章:

  • 2022-02-07
  • 2021-07-10
  • 2022-01-08
  • 2022-12-23
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-11
相关资源
相似解决方案