-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple progress bar on the same page? #3
Comments
With the last version it's possible to create as many progress observers as you want, though right now it's not possible to add offsets so they track specific parts of the page, but it's something I'm working right now and expect to release soon. |
That's a good new :) |
Not yet, I gave it a try a while ago but the solution was super buggy. I hope to have the time to try again soon. |
I found a way, I put the code here if it can help you to add this feature if your library ;) |
Wow! Really cool @geosenna, I'm trying to come up with a way that you can pass coordenates to the observer so it tracks specific areas of the page. Something like: const observer = new scrollProgress({
top: 200,
bottom: 600,
onUpdate(x, y) {
console.log(x, y)
}
}) So this way it serves to all purposes, not only reading progress bars. Another option would be to optionally pass a DOM node and track that, update on resize. Food for thought. |
Would it be possible to use 2 or more progress bars in the same page.
For example on a page with 3 articles, each one should have its progress bar. So if the first article is finish, the progress start again with the second . Also if you scroll up, then the progress bar adapt accordingly?
The text was updated successfully, but these errors were encountered: