bootstrap-toc icon indicating copy to clipboard operation
bootstrap-toc copied to clipboard

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

Open deargle opened this issue 4 years ago • 0 comments

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.

deargle avatar Jan 26 '21 03:01 deargle