jquery - Bootstrap Scrollspy doesn't work -


why scrollspy doesn't work?

http://jsfiddle.net/nnrew/

<div id="nav">     <ul id="menu">          <li><a href="#test">test</a></li>          <li><a href="#test2">test2</a></li>     </ul> </div> 

you should give css html element via class not id. make simpler thing. think css includes more needed thing. in addition to, have add bootstrap.min.js , bootstrap-combined.min.css.

<div class="container">     <div class="row">         <div id="nav" class="span3">             <ul class="nav nav-list affix">                 <li><a href="#test">test</a>                  </li>                 <li><a href="#test2">test2</a>                  </li>             </ul>         </div>         <div class="span9 content">             <div id="test">my first div</div>             <div id="test2">my second div</div>         </div>     </div> </div> 

css

.content div {     background-color: #f5f5f5;     height: 600px; } 

demo


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

html - Repeat image to extend header to fill screen -

javascript - Backbone.js getting target attribute -