New post: Creating A Reading Progress B ...

New post: Creating A Reading Progress Bar In JavaScript

Jan 09, 2022

Adding a progress bar to the top of the page is a simple way of showing the user how far down the page they have read. There is a scroll bar on the right hand side of the page on my current device, but that isn't always present on all devices. It is possible to hide the scroll bar on Macs and mobile devices so that they are only shown as the page is being scrolled.

Putting this piece of information at the top of the page can be a useful indicator that augments already existing technologies.

To start, we need to add a little bit of markup to the page. This consists of a div that will be positioned at the top of the page and a second inner div to provide the progress bar. This markup can be placed anywhere on the page as it will be positioned absolutely.

Read more here: https://www.hashbangcode.com/article/creating-reading-progress-bar-javascript

Enjoy this post?

Buy !# code (Hash Bang Code) a coffee

More from !# code (Hash Bang Code)