Javascript Intersection Observer

Re-write your scrolling functions for better performance.

Alex Zito

--

credit: Denys Nevozhai, unsplash.com

The Intersection observer API allows you to determine when and how much of an element is visible inside another element. This new API replaces the scroll handler API in many cases. The top use cases for the intersection observer are:

  1. Sticky navigation bars

--

--

Alex Zito

Software Developer + Product Manager. Interested in Travel, Culture, Economics and the Internet. Join Medium: https://tinycode.medium.com/membership