In the example of code above, an image fades into view when manually scrolling to the element further down the page.
It looks like onscroll is triggered when certain pixels have been manually scrolled to. Is there a way to do this effect without specifying the number of pixels, such as triggering the fade-in when the element is scrolled into view?
When I do a search for “scroll into view” then I get code on how to click a button and the element scrolls to the top. But I want the image to fade in when the user manually scrolls to the image. What terminology do I search to get that code?