Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
be164f4d
Commit
be164f4d
authored
10 years ago
by
Mark Otto
Browse files
Options
Download
Plain Diff
Merge pull request #15900 from kkirsche/patch-5
[Docs—Fixes
#15882
]Use an ID as the example for Scrollspy
parents
7e594b4b
ced312a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/_includes/js/scrollspy.html
+3
-3
docs/_includes/js/scrollspy.html
with
3 additions
and
3 deletions
+3
-3
docs/_includes/js/scrollspy.html
+
3
-
3
View file @
be164f4d
...
@@ -75,9 +75,9 @@ body {
...
@@ -75,9 +75,9 @@ body {
}
}
{% endhighlight %}
{% endhighlight %}
{% highlight html %}
{% 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
class=
"nav nav-tabs"
role=
"tablist"
>
...
...
</ul>
</ul>
...
@@ -89,7 +89,7 @@ body {
...
@@ -89,7 +89,7 @@ body {
<h3>
Via JavaScript
</h3>
<h3>
Via JavaScript
</h3>
<p>
After adding
<code>
position: relative;
</code>
in your CSS, call the scrollspy via JavaScript:
</p>
<p>
After adding
<code>
position: relative;
</code>
in your CSS, call the scrollspy via JavaScript:
</p>
{% highlight js %}
{% highlight js %}
$('body').scrollspy({ target: '
.
navbar-example' })
$('body').scrollspy({ target: '
#
navbar-example' })
{% endhighlight %}
{% endhighlight %}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets