jQuery position() Method
jQuery position() Method
The position() method is used to return the position of the first matched element relative to its parent. It returns an object with 2 properties i.e, the top and left positions in pixels.
Syntax:-
Its syntax is:- $(selector).position()