An Idiosyncratic Blog
BlogSnippets Tags

Table-of-contents

Articles
Cover image for Sticky Header using Intersection Observer API
JavaScriptMay 12, 2021

Sticky Header using Intersection Observer API

I wanted to have neat looking Table of Contents for a long article. In this post, I explain how I used IntersectionObserver to build it a Table of Contents that syncs with the scroll position of the page and highlight the current section.

© 2022
Dhanraj Padmashali
•
An Idiosyncratic Blog
Github
•
LinkedIn
•
Twitter
•
RSS Feed