:nth-last-child() selector

:nth-last-child() Selector

nth-last-child selector

Description: Selects all elements that are the nth-child of their parent, counting from the last element to the first.

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

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

Because