bootstrap-toc
bootstrap-toc copied to clipboard
drop jQuery dependency
bootstrap5 beta is out and the biggest change would be the drop of jquery dependency.
I just briefly tested bootstrap-toc
on my website and it appears to be working properly as long as I load bootstrap5
and jquery
. I am not quite sure if it is worthwhile to stop using jquery in bootstrap-toc
but it would be nice if someone tries to tackle it.
Ah, good to know. https://github.com/afeld/bootstrap-toc/issues/16 would probably be a good way to future-proof against that problem.
Would love some help on that if interested!
Had a look at #16. My "working properly" might be wrong since scrollspy might not be working properly. Anyway, I think dropping dependency on jquery is more important than dropping dependency on bootstrap
.
Got it. Re-titled to reflect that. Seems very doable, though not sure when I will get to it. Pull request welcome!
Hey,
I started working on this feature, I was almost done when I noticed that I made a mistake.
The $scope
option can contain more than one element in this library, but my implementation assumes that it's a single element.
I'm pretty tired now to fix it (and I don't know if/when I'll want to continue it), but I'll link my fork so you can maybe take it and improve it, and hopefully finish this transition.
https://github.com/Pustur/bootstrap-toc/tree/remove-jquery
I'm available if you have any questions.
PS: Commits are pretty messy, but I left them separated to better show the steps I took.