Shades88
Shades88

Reputation: 8360

How to find coordinates of an element relative to browser window

I want coordinates of an element relative to the browser window. So if an element is at top-left corner of browser can I get it's coordinates as x=0, y=0. How to achieve this ?

Upvotes: 2

Views: 1351

Answers (1)

Nicola Peluchetti
Nicola Peluchetti

Reputation: 76910

I think you could use this script or use jquery offset()

Upvotes: 1

Related Questions