Skip to content

Commit

Permalink
Merge pull request #15900 from kkirsche/patch-5
Browse files Browse the repository at this point in the history
[Docs—Fixes #15882]Use an ID as the example for Scrollspy
  • Loading branch information
mdo committed Feb 25, 2015
2 parents 7e594b4 + ced312a commit be164f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/_includes/js/scrollspy.html
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 be164f4

Please sign in to comment.