When element in fixed container and i try get offsetTop coorditante i get the same number every time. How can I get offsetTop the coordinate of an item in a fixed container? I can't use JQuery.
<body>
<div class="fixed">
<div class="el"></div>
</div>
</body>
const el = document.querySelector('.el');
window.addEventListener('scroll', function() {
console.log(el.offsetTop);
})