js how to get position of item relative to top of the bodyu code example
Example: javascript get element position relative to document
element.getBoundingClientRect().top + document.documentElement.scrollTop
element.getBoundingClientRect().top + document.documentElement.scrollTop