Skip to content
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

How does this work without calling .scrollspy('refresh') ? #75

Open
deargle opened this issue Jan 26, 2021 · 0 comments
Open

How does this work without calling .scrollspy('refresh') ? #75

deargle opened this issue Jan 26, 2021 · 0 comments

Comments

@deargle
Copy link

deargle commented Jan 26, 2021

I am scratching my head something fierce. I've used this plugin successfully in the past, and I see it working on live sites, but it's not working for me on an ultra stripped down example -- scrollspy doesn't update the active link. I think it comes down to this library dynamically adding elements, but when that is done, scrollspy expects a refresh so that it knows about the new elements. What I can't figure out is how this is working in any other data-attribute-type setup. Is it just race conditions for sites that have lots of other things going on on the page too? I'm thinking yes.

Would it be prudent to integrate a .scrollspy('refresh') call in this library code? I can write it, unless that's a terrible idea for a reason I can't see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant