How to do that when I scrolled to the section #about the asset class was added to it?

  • can be implemented using pageYOffset - Yaroslav Voronin

1 answer 1

You can determine using this function, and then hang

function isScrolledIntoView(el) { const rect = el.getBoundingClientRect(); const elemTop = rect.top; const elemBottom = rect.bottom; const isVisible = (elemTop >= 0) && (elemBottom <= window.innerHeight); return isVisible; }