.position()
Retrieves the position of the first element in the collection relative to its offset parent.
Usage
const position = $(selector).position();
Returns
An object containing the properties top
and left
, or undefined if the collection is empty.
Differences to jQuery
None.