more reliable scrollspy #38043
Unanswered
git-user-hub
asked this question in
Ideas
Replies: 1 comment 1 reply
-
|
This would be a fine change as it would be more stable. However any behavior change, would be breaking, until, we change to the next major version |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why not keep it simple?
Maybe take these defaults:
rootMargin: '0px 0px -70%'and default threshold of 0
Edit:
That should be quite universal now.
Taking into account all id's, but checking if a corresponding nav link exists.
Edit:
Only check for id's that appear in a.nav-link.
Adding and removing .active for current id is more robust when scrolling up / down right after each other.
Beta Was this translation helpful? Give feedback.
All reactions