May 12, 2021
- 1608 words
Sticky Header using Intersection Observer API
I wanted to have the Table of Contents sync with the scroll position of the page and highlight the current section. In this post, I explain how I used IntersectionObserver to achieve it.