:nth-child() selector

:nth-child() Selector

nth-child selector

Description: Selects all elements that are the nth-child of their parent.

  • version added: 1.1.4jQuery( ":nth-child(index/even/odd/equation)" )

    index: The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-child(even), :nth-child(4n) )

Because jQuery's implementation of :nth- selectors is strictly derived from the C