Too Long; Didn't Read
JavaScript has a native Intersection Observer API that lets you use it to detect the visibility of an element in the DOM. In this article, we will discuss how this Intersections Observer API works and how we can use it in our HTML/CSS page. We'll create a simple web page that implements this "reveal contents on scroll" feature using JavaScript. The resulting layout is a simple HTML page with 3 sections, the first section is of little interest to us as we will mostly be working with the second section, we simply want more room to be able to scroll.