Scroll Progress is a free library on TypeScript for syncing page scrolling and menu navigation. This tiny plugin is intended to interactively display scrolling page progress.
How does it work?
All you need is a navigation menu with links to relevant paragraphs of the text. When initializing an object, you need to specify the pointer and list selectors, as well as the callback function.
Must Read: Animated Sliding Active Menu Item Indicator In jQuery | Navigation Menu
TypeScript Page Scrolling Navigation Menu Bar Details
Post Name | Scrollspy Scroll Progress |
Author Name | eabrega |
Category | Menu Plugins, Progress Bar, Scrolling |
Official Page | Click Here |
Official Website | github.com |
Publish Date | September 2, 2020 |
Last Update | August 24, 2023 |
Download | Link Below |
License | MIT |
How to make use of it:
1. Create nav links pointing to the sections.
<nav id="home"> <div id="cursor"></div> <menu> <a href="#link1">Paragraph A</a> <a href="#link2">Paragraph B</a> <a href="#link3">Paragraph C</a> </menu> </nav>
<h1 id="link1">Paragraph A</h1> <h1 id="link2">Paragraph B</h1> <h1 id="link3">Paragraph C</h1>
2. Create a container to hold scroll position information.
<status> <span id="current-paragraph-name"></span> <span id="current-paragraph-percent"></span> </status>
3. Load the Scroll Progress library on the web page.
<script src="scroll-progress.min.js"></script>
4. Enable the scrollspy
functionality and scroll the progress indicator.
document.addEventListener("DOMContentLoaded", function (event) { let currentParagraphName = document.getElementById('current-paragraph-name'); let currentParagraphPercent = document.getElementById('current-paragraph-percent'); new ScrollProgress.Init( "#cursor", "menu", progress => { currentParagraphName.innerText = document.getElementById(progress.id).innerText; currentParagraphPercent.innerText = progress.percent + '%'; }, id => { document.querySelectorAll('a[href*="link"]').forEach(element => element.classList.remove('active-meny-item')); document.querySelector(`[href="#${id}"]`).classList.add('active-meny-item'); } ); });
There are two types of events, onScrolled and onChanged. They can be used together or separately.
This small plugin is designed to interactively show the scrolling progress of a page. There are two actions: onScrolled
and onChanged
. They can be used together or separately.
- onScrolled – returns the progression for each scroll event. It is convenient to use when you need to view progress in real-time.
- onChanged – works only when replacing one paragraph with another. This is useful for toggling the active menu item in the navigation block.
See Demo And Download

Official Website(eabrega): Click Here
This superior jQuery/javascript plugin is developed by eabrega. For extra Advanced usage, please go to the official website.