You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
I spent an awfully long time debugging why scrollspy did not work for me.
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'
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!
The text was updated successfully, but these errors were encountered: