const el = document.getElementById('id') const elDistanceToTop = window.pageYOffset + el.getBoundingClientRect().top