Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
57bd8f94
Commit
57bd8f94
authored
Jun 10, 2014
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grunt
parent
bc38d3b3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
dist/js/bootstrap.js
dist/js/bootstrap.js
+11
-1
dist/js/bootstrap.min.js
dist/js/bootstrap.min.js
+2
-2
docs/dist/js/bootstrap.min.js
docs/dist/js/bootstrap.min.js
+2
-2
No files found.
dist/js/bootstrap.js
View file @
57bd8f94
...
...
@@ -1725,6 +1725,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this
.
offsets
=
[]
this
.
targets
=
[]
this
.
activeTarget
=
null
this
.
scrollHeight
=
0
this
.
$scrollElement
.
on
(
'
scroll.bs.scrollspy
'
,
process
)
this
.
refresh
()
...
...
@@ -1737,6 +1738,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
offset
:
10
}
ScrollSpy
.
prototype
.
getScrollHeight
=
function
()
{
return
this
.
$scrollElement
[
0
].
scrollHeight
||
Math
.
max
(
this
.
$body
[
0
].
scrollHeight
,
document
.
documentElement
.
scrollHeight
)
}
ScrollSpy
.
prototype
.
refresh
=
function
()
{
var
offsetMethod
=
'
offset
'
var
offsetBase
=
0
...
...
@@ -1748,6 +1753,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this
.
offsets
=
[]
this
.
targets
=
[]
this
.
scrollHeight
=
this
.
getScrollHeight
()
var
self
=
this
...
...
@@ -1772,13 +1778,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
ScrollSpy
.
prototype
.
process
=
function
()
{
var
scrollTop
=
this
.
$scrollElement
.
scrollTop
()
+
this
.
options
.
offset
var
scrollHeight
=
this
.
$scrollElement
[
0
].
scrollHeight
||
Math
.
max
(
this
.
$body
[
0
].
scrollHeight
,
document
.
documentElement
.
scrollHeight
)
var
scrollHeight
=
this
.
getScrollHeight
(
)
var
maxScroll
=
this
.
options
.
offset
+
scrollHeight
-
this
.
$scrollElement
.
height
()
var
offsets
=
this
.
offsets
var
targets
=
this
.
targets
var
activeTarget
=
this
.
activeTarget
var
i
if
(
this
.
scrollHeight
!=
scrollHeight
)
{
this
.
refresh
()
}
if
(
scrollTop
>=
maxScroll
)
{
return
activeTarget
!=
(
i
=
targets
[
targets
.
length
-
1
])
&&
this
.
activate
(
i
)
}
...
...
dist/js/bootstrap.min.js
View file @
57bd8f94
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.min.js
View file @
57bd8f94
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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