Reputation: 721
How to identify the x axis and y-axis of particluar element using jquery. Like we use pageX and pageY to identify the mouse pointer's position.
Upvotes: 1
Views: 4932
Reputation: 8638
there is position()
function that return Object{top,left}
var p = $("p:first");
var position = p.position();
var left = position.left;
var top = position.top;
Upvotes: 2