Net Citizen
Net Citizen

Reputation: 5344

Get the position of a DOM element via x, y co-ordinates

Is there a way to select the top most DOM element at a certain x-y position with Javascript?

So give x and y, what DOM element is there?

Upvotes: 2

Views: 782

Answers (1)

kennytm
kennytm

Reputation: 523764

You can use document.getElementFromPoint.

Upvotes: 3

Related Questions