jQuery last() method
Example
Select the last
the last inside the element
element:
$("p").last()
Try it »
Definition and Usage
The last() method returns the last element of the selected elements.
**Tip:** To return the first element, use first() method.
Syntax
$(
selector
).last()
More examples
the last in the collection of elements Element
How to select
the last in the collection of elements .
jQuery Traversal Methods