title: Position of Div in relation to the Top of the Viewport
body: <p>I am wondering how I can get the number of pixels (or measurement in general) from a div to the top of the window in Javascript.  I am not looking for an offset y in relation to the document, simply to the top of where the browser is displaying.  I tried the "answered" solution here: <a href="https://stackoverflow.com/questions/211703/is-it-possible-to-get-the-position-of-div-within-the-browser-viewport-not-with">Is it possible to get the position of div within the browser viewport? Not within the document. Within the window</a>, but at least in Safari, I am running into a problem where it returns the same number no matter where the div's really are.</p>
  
  <p>Thanks for any help!</p>