Easy Tutorial
❮ Html Text Sel First ❯

jQuery last() Method

jQuery Traversal Methods

Example

Select the last <p> element within the last <div> element:


Definition and Usage

The last() method returns the last element of the selected elements.

Tip: To return the first element, use the first() method.


Syntax


More Examples

Select the last <span> element in a collection of <p> elements


jQuery Traversal Methods

❮ Html Text Sel First ❯