Skip to content

collectOffsetTop()

Collects the cumulative offsetTop value through the element parent chain.

Example:

ts
const offsetTop = collectOffsetTop(document.getElementById('section'));

Released under the MIT License.