Skip to content

Commit

Permalink
[Docs—Fixes twbs#15882]Use an ID as the example for Scrollspy
Browse files Browse the repository at this point in the history
Fixes twbs#15882 — Use an ID as the example for Scrollspy so that it is more clear that this is for use with a single nav.
  • Loading branch information
kkirsche committed Feb 24, 2015
1 parent feda77f commit ced312a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/_includes/js/scrollspy.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ <h3>Via data attributes</h3>
}
{% endhighlight %}
{% highlight html %}
<body data-spy="scroll" data-target=".navbar-example">
<body data-spy="scroll" data-target="#navbar-example">
...
<div class="navbar-example">
<div id="navbar-example">
<ul class="nav nav-tabs" role="tablist">
...
</ul>
Expand All @@ -89,7 +89,7 @@ <h3>Via data attributes</h3>
<h3>Via JavaScript</h3>
<p>After adding <code>position: relative;</code> in your CSS, call the scrollspy via JavaScript:</p>
{% highlight js %}
$('body').scrollspy({ target: '.navbar-example' })
$('body').scrollspy({ target: '#navbar-example' })
{% endhighlight %}


Expand Down

0 comments on commit ced312a

Please sign in to comment.