Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.nav class being mandatory in scrollspy #14654

Closed
stopachka opened this issue Sep 20, 2014 · 2 comments
Closed

.nav class being mandatory in scrollspy #14654

stopachka opened this issue Sep 20, 2014 · 2 comments
Labels
Milestone

Comments

@stopachka
Copy link

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!

@cvrebert cvrebert added the docs label Sep 20, 2014
@cvrebert cvrebert added this to the v3.2.1 milestone Sep 20, 2014
@cvrebert cvrebert changed the title .nav class being mandatory in Bootstrap scrollspy .nav class being mandatory in scrollspy Sep 20, 2014
@mdo
Copy link
Member

mdo commented Sep 21, 2014

Can't change it until v4, so the best that can be done is a notice in the docs for v3.

@mdo
Copy link
Member

mdo commented Sep 23, 2014

On the list for v4.

@mdo mdo closed this as completed Sep 23, 2014
@mdo mdo reopened this Sep 23, 2014
@mdo mdo closed this as completed in ccecb7c Sep 23, 2014
cvrebert added a commit that referenced this issue Oct 1, 2014
Saranya-Raaj pushed a commit to Saranya-Raaj/bootstrap that referenced this issue Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants