paint-brush
A Beginner's Guide to JavaScript's The Intersection Observer APIby@daveyhert
6,148 reads
6,148 reads

A Beginner's Guide to JavaScript's The Intersection Observer API

by David Herbert11mJune 5th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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.

Company Mentioned

Mention Thumbnail
featured image - A Beginner's Guide to JavaScript's The Intersection Observer API
David Herbert HackerNoon profile picture
David Herbert

David Herbert

@daveyhert

An aspiring full-stack developer with a passion for interactive and immersive user experience.

About @daveyhert
LEARN MORE ABOUT @DAVEYHERT'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

David Herbert HackerNoon profile picture
David Herbert@daveyhert
An aspiring full-stack developer with a passion for interactive and immersive user experience.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite