Code Food Travel repeat!

Twitter Bootstrap Scrollspy SideNav SideBar Not Working SOLUTION

If you’ve added in all the html code, and javascript calls and it’s still not working

            $('.bs-docs-sidenav').affix({
                offset: {
                    top: function () { return $window.width() <= 980 ? 90 : 10 }
                    , bottom: 270
                }
            });

    <div class="bs-docs-sidebar">
      <ul class="nav nav-list bs-docs-sidenav belowmast affix">
        <li><a href="#buy"><i class="icon-chevron-right"></i>&uarr;&nbsp;&nbsp;&nbsp; Home</a></li>
        <li><a href="#letscreate"><i class="icon-chevron-right"></i> Let's Create</a></li>
        <li><a href="#ourjournals"><i class="icon-chevron-right"></i> Our Journals</a></li>
        <li><a href="#yourideas"><i class="icon-chevron-right"></i> Your Ideas In KLINE</a></li>
        <li><a href="#gallery"><i class="icon-chevron-right"></i> Gallery</a></li>
        <li><a href="#components"><i class="icon-chevron-right"></i> Components</a></li>
      </ul>
    </div>

The answer could be simple!

Does your body tag include the required data attributes?

<body data-spy="scroll" data-target=".bs-docs-sidebar" >

Substitute .bs-docs-sidebar for whatever your scrollspy sidebar is called!

For an extra tip today, learn how to Add SMOOTH SCROLLING to your sidenav HERE!

About Steven Chu


Hi, I'm Steven! I'm an entrepreneur, photographer and art director in New York. Follow this blog for self expression, fun, and most importantly: looking comfortable, at ease, and amazing in your photos no matter who takes them! I dedicate this to my amazing friends who have let me inadvertently turn all of our hangouts and travel photos into a never ending photoshoot of fun. The proof is in the pudding-- our photos rock. My other projects: I'm the founder of InstaTechie.com, a face-to-face tech concierge service for NYC. Book a techie to walk you through something you want to learn! My work focuses on socially engaged art projects which use technology to create access to resources for communities. Visit Steven Chu Studio (stevenchustudio.com) for branding & design work or Steven Chu (stevenchu.com) for photography projects.

Leave a Reply

%d bloggers like this:
Read previous post:
RECIPE: Chinese Fried (Rice) Quinoa & Southeast Asian Sides [Vegetarian]

Tonight has been a cooking breakthrough. This experiment is one of the most amazing meals I've ever cooked, and pretty...

Close