getOffsetTop()
getOffsetTop()
is a helper method I wrote to get an element’s distance from the top of the document.
var elem = document.querySelector('#some-element');
var distance = getOffsetTop(elem);
getOffsetTop()
is a helper method I wrote to get an element’s distance from the top of the document.
var elem = document.querySelector('#some-element');
var distance = getOffsetTop(elem);