Skip to main content
edited tags
Link
Florent
  • 12.4k
  • 10
  • 51
  • 58
edited title
Link
Alessandro Minoccheri
  • 36.1k
  • 22
  • 128
  • 176

jQuery BoostrapBootstrap ScrollSpy doesn't work

Source Link
Caio Tarifa
  • 6.1k
  • 13
  • 50
  • 75

jQuery Boostrap ScrollSpy doesn't work

I'm trying the ScrollSpy Bootstrap plugin, but it's not working properly. See the code below, it always highlight the last item.

http://jsfiddle.net/bRYMC/

<nav id="navbar"> <ul class="nav"> <li><a href="#page1">Page 1</a></li> <li><a href="#page2">Page 2</a></li> <li><a href="#page3">Page 3</a></li> <li><a href="#page4">Page 4</a></li> <li><a href="#page5">Page 5</a></li> </ul> </nav> <div data-spy="scroll"> <section id="page1" class="page"> <h1>Page 1</h1> </section> <section id="page2" class="page"> <h1>Page 2</h1> </section> <section id="page3" class="page"> <h1>Page 3</h1> </section> <section id="page4" class="page"> <h1>Page 4</h1> </section> <section id="page5" class="page"> <h1>Page 5</h1> </section> </div> 

​Can you help me?