亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

返回值:jQuery:nth-of-type(n|even|odd|formula)

V1.9概述

選擇同屬于一個(gè)父元素之下,并且標(biāo)簽名相同的子元素中的第n個(gè)。

因?yàn)閖Query的實(shí)現(xiàn):nth-是嚴(yán)格來(lái)自CSS規(guī)范,n值是“1-indexed”,也就是說(shuō),從1開(kāi)始計(jì)數(shù)。對(duì)于所有其他選擇器表達(dá)式比如:eq()?或?:even?,jQuery遵循JavaScript的“0索引”的計(jì)數(shù)。

這個(gè)不尋常的用法,可進(jìn)一步討論中找到W3C CSS specification.

參數(shù)

nV1.9

The index of each child to match.

Must be a number. The first element has the index number 1.

evenV1.9

Selects each even child element

oddV1.9

Selects each odd child element

formulaV1.9

Specifies which child element(s) to be selected with a formula (an?+?b). Example: p:nth-last-child(3n+2) selects each 3rd paragraph, starting at the last 2nd child

示例

查找每個(gè)span,這個(gè) span 是 其所有兄弟span元素中的第二個(gè)元素。

<div>
<span>John</span>
<b>Kim</b>
<span>Adam</span>
<b>Rafael</b>
<span>Oleg</span>
</div>
<div>
<b>Dave</b>
<span>Ann</span>
</div>
<div>
<i><span>Maurice</span></i>
<span>Richard</span>
<span>Ralph</span>
<span>Jason</span>
</div> $("span:nth-of-type(2)");