4

I am encountering an issue with Scrollspy. I am able to get the links to point to the correct section, but it is not applying an active class to the currently "selected" li element. You can see the issue on my beta website at: http://beta.joshuabock.com/resume.html. I have looked around for a solution but so far no luck. Any suggestions on how to resolve this issue?

The basic code structure is as follows:

<aside>
   <nav id="nav-list>
     <ul class="nav nav-list">
        <li>Menu Items</li>
     </ul>
   </nav>
</aside>
<article data-spy="scroll" data-target="#nav-list" data-offset="0">
   <section>Main Content</section>

</article> 
4

2 回答 2

2

您似乎没有按照文档将所需的属性添加到 body 标记中:

http://twitter.github.com/bootstrap/javascript.html#scrollspy

<body data-spy="scroll" data-target=".navbar">

我猜 .nav-bar 会是你的导航。

于 2013-02-11T17:18:13.297 回答
1

在停止编码后,我能够解决这个问题。我确实必须像比利所说的那样移动数据间谍,但我也为我的导航创建了一个新 ID。另外,我更新了我的 Bootstrap 和 Jquery 版本。

于 2013-04-19T23:33:01.990 回答