]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
[Docs—Fixes #15882]Use an ID as the example for Scrollspy 15900/head
authorKevin Kirsche <Kev.Kirsche+GitHub@gmail.com>
Tue, 24 Feb 2015 14:14:50 +0000 (09:14 -0500)
committerKevin Kirsche <Kev.Kirsche+GitHub@gmail.com>
Tue, 24 Feb 2015 14:14:50 +0000 (09:14 -0500)
Fixes #15882 — Use an ID as the example for Scrollspy so that it is more clear that this is for use with a single nav.

docs/_includes/js/scrollspy.html

index 84370a7bf2610e92d2c0c8f18b57d9bb2bdfdaa4..7d5fa5b496da2bff6319048d0417555c9f95a42f 100644 (file)
@@ -75,9 +75,9 @@ body {
 }
 {% 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>
@@ -89,7 +89,7 @@ body {
   <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 %}