jQuery last()Method
Definition and Usage
The last() method returns the last element of the selected elements.
Tip:To return the first element, use thefirst()method.
Syntax
$(selector).last()
More Examples
Select the last <span> element in the set of <p> elements
How to select the last <span> element among a group of <p> elements.
Other Extensions
jQuery Traversal Methods