Something went wrong while setting issue due date.
.nav class being mandatory in scrollspy
Closed
.nav class being mandatory in scrollspy
Created by: stopachka
I spent an awfully long time debugging why scrollspy did not work for me.
<div class="scroll-nav">
<ul>
</ul>
</div>
I would write $('scroll-container').scrollspy({target: ".scroll-nav"})
and nothing would happen. It took some source code snooping to figure out that that the selector that bootstrap creates to find the tags inside the list requires a '.nav'
this.selector = (this.options.target || '') + ' .nav li > a'
I'm not sure that this is necessary, it would be much simpler if the target that we gave it was the ul itself.
I'm not sure about all the scenarios though, so if it is important to do it this way, would be awesome if this was made clear on the getbootstrap.com documentation.
Other than that, was a super happy experience using bootstrap!