I want to know how to get the X and Y position of HTML elements such as img and div in JavaScript relative to the browser window.
img
div
If you are using jQuery, this could be a simple solution: