Docs: correct usage of ScrollSpy() via js

- fix for v3-wip
- fixed for v2 in ddce41d7de1f2a262196182a054f1e4b2393733e (#8215)