Need Assistance?

support@tutorialshub.in

JavaScript Components

Scrollspy

ADVERTISEMENT
Bootstrap Free Lesson
5 min read
ADVERTISEMENT

Scrollspy

Scrollspy updates navigation state as the user scrolls through sections of a long page.

Core concept

Explain the navigation target, section IDs, active links, scroll container, and how Bootstrap detects the current section.

Using it in a real interface

Build a documentation page with a table of contents for Introduction, Grid, Forms, and Components. Explain why headings and IDs need to match the navigation targets consistently.

Implementation notes

Test scrollspy after changing fixed-header heights or section spacing. The active state can appear offset if the page\'s scrolling context does not match the configuration.

ADVERTISEMENT