jQuery Tutorial Tutorials - jQuery :nth-last-of-type() selector

:nth-last-of-type() selector

The jQuery :nth-last-of-type() selector is used to select all elements that are the nth-child of their parent in relation to siblings with the same elements name,counting from the last element to the first.

jQuery :nth-last-of-type() selector Syntax

$(':nth-last-of-type(index/even/odd/equation)')

jQuery :nth-last-of-type() selector Examples

Following is a simple example which would hightlight the second to last p in each matched div:

Try now

Date:2019-08-18 12:59:50 From:www.Lautturi.com author:Lautturi