rstacruz / nprogress

For slim progress bars like on YouTube, Medium, etc
http://ricostacruz.com/nprogress
MIT License
25.99k stars 1.81k forks source link

Added config param topPosition to enable setting a custom top position on the fly. #155

Open ggada opened 7 years ago

ggada commented 7 years ago

Using this config option, the position of the progress bar can be configured based on the position of some other container. It can be changed on the fly to render at a certain position. In my project I wanted to align the progress bar with the underline on the word "weeks". Even on scrolling, I can make the progress bar to coincide with the underline on "weeks". If the weeks underline is scrolled over the screen, it renders at the default position (0px).

screenshot 1

screenshot 2