How do I find the vertical distance from the top of the page to where the element exist in the DOM using javascript/jQuery?
I\'ve something like
As far as i know .offset() get the distance between the current scroll position and the top of the document.
.offset()
You need to use this: $("li.test").position().top
$("li.test").position().top