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
jQuery .offset() will get the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to the document.