14 comments on “Bootstrap ScrollSpy Pitfalls and Fixes

    • No, sorry, I haven’t. But if that is your problem I would suggest a couple of things.

      First, if the screen is small because it is on a mobile device I personally hide the scrollspy on mobile devices. I always give all the realestate I can to the content and less to helpers like scrollspy.

      Second, if this is on a normal sized screen you may need to reevaluate exactly what is being put in the menu and elect to use submenus in your scrollspy. In Bootstrap it is called Affix and here is the link to read more. http://getbootstrap.com/javascript/#affix

      Hope that helps.

  1. Does affix work well on elements with class hidden-xs? (Eg. when resizing the window on a desktop so the affixed element is hidden, scroll down, and resize the window so the affixed element is visible again).
    I think the affixed element will not be positioned until you scroll again.

Leave a Reply