84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
不明白为什么next后面还要加个选择器作甚?不管怎么加选择都是你所找到的那个元素的下一个元素啊!
Is the selector after Next necessary? -PHP Chinese website Q&A-Is the selector after Next necessary? -PHP Chinese website Q&A
Please watch and learn.
肯定有必要啊!你应该是把next()和选择器搞混淆了
$('.item-2').next(':eq(1)'),你应该是觉得$('.item-2').next()就够了,因为next()总是为class=item-2紧接的那个元素,但是class=item-2的元素不止一个啊,所以$('.item-2').next()的元素也不止一个。
所以$('.item-2').next(':eq(1)')是选择为所有的类为class=item-2元素下面的那个元素的集合中下标为1的那个元素。
Is the selector after Next necessary? -PHP Chinese website Q&A-Is the selector after Next necessary? -PHP Chinese website Q&A
Please watch and learn.
肯定有必要啊!你应该是把next()和选择器搞混淆了
$('.item-2').next(':eq(1)'),你应该是觉得$('.item-2').next()就够了,因为next()总是为class=item-2紧接的那个元素,但是class=item-2的元素不止一个啊,所以$('.item-2').next()的元素也不止一个。
所以$('.item-2').next(':eq(1)')是选择为所有的类为class=item-2元素下面的那个元素的集合中下标为1的那个元素。