jQuery Tutorial Tutorials - jQuery :last-of-type selector

:last-of-type selector

The jQuery :last-of-type selector is used to select the elements that are the last among siblings and have no other element with both the same parent and the same elemetn name coming before it in the document tree.

jQuery :last-of-type selector Syntax

$(':last-of-type')

jQuery :last-of-type selector Examples

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

Date:2019-08-18 12:48:25 From:www.Lautturi.com author:Lautturi