Skip to content
GitLab
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
1d892cee
Commit
1d892cee
authored
10 years ago
by
Bootstrap's Grunt bot
Browse files
Options
Download
Email Patches
Plain Diff
automatic grunt dist
parent
9ea98561
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dist/js/bootstrap.js
+14
-17
dist/js/bootstrap.js
dist/js/bootstrap.min.js
+1
-1
dist/js/bootstrap.min.js
with
15 additions
and
18 deletions
+15
-18
dist/js/bootstrap.js
+
14
-
17
View file @
1d892cee
...
@@ -1837,10 +1837,8 @@ if (typeof jQuery === 'undefined') {
...
@@ -1837,10 +1837,8 @@ if (typeof jQuery === 'undefined') {
// ==========================
// ==========================
function
ScrollSpy
(
element
,
options
)
{
function
ScrollSpy
(
element
,
options
)
{
var
process
=
$
.
proxy
(
this
.
process
,
this
)
this
.
$body
=
$
(
document
.
body
)
this
.
$scrollElement
=
$
(
element
).
is
(
document
.
body
)
?
$
(
window
)
:
$
(
element
)
this
.
$body
=
$
(
'
body
'
)
this
.
$scrollElement
=
$
(
element
).
is
(
'
body
'
)
?
$
(
window
)
:
$
(
element
)
this
.
options
=
$
.
extend
({},
ScrollSpy
.
DEFAULTS
,
options
)
this
.
options
=
$
.
extend
({},
ScrollSpy
.
DEFAULTS
,
options
)
this
.
selector
=
(
this
.
options
.
target
||
''
)
+
'
.nav li > a
'
this
.
selector
=
(
this
.
options
.
target
||
''
)
+
'
.nav li > a
'
this
.
offsets
=
[]
this
.
offsets
=
[]
...
@@ -1848,7 +1846,7 @@ if (typeof jQuery === 'undefined') {
...
@@ -1848,7 +1846,7 @@ if (typeof jQuery === 'undefined') {
this
.
activeTarget
=
null
this
.
activeTarget
=
null
this
.
scrollHeight
=
0
this
.
scrollHeight
=
0
this
.
$scrollElement
.
on
(
'
scroll.bs.scrollspy
'
,
process
)
this
.
$scrollElement
.
on
(
'
scroll.bs.scrollspy
'
,
$
.
proxy
(
this
.
process
,
this
)
)
this
.
refresh
()
this
.
refresh
()
this
.
process
()
this
.
process
()
}
}
...
@@ -1864,20 +1862,19 @@ if (typeof jQuery === 'undefined') {
...
@@ -1864,20 +1862,19 @@ if (typeof jQuery === 'undefined') {
}
}
ScrollSpy
.
prototype
.
refresh
=
function
()
{
ScrollSpy
.
prototype
.
refresh
=
function
()
{
var
offsetMethod
=
'
offset
'
var
that
=
this
var
offsetBase
=
0
var
offsetMethod
=
'
offset
'
var
offsetBase
=
0
this
.
offsets
=
[]
this
.
targets
=
[]
this
.
scrollHeight
=
this
.
getScrollHeight
()
if
(
!
$
.
isWindow
(
this
.
$scrollElement
[
0
]))
{
if
(
!
$
.
isWindow
(
this
.
$scrollElement
[
0
]))
{
offsetMethod
=
'
position
'
offsetMethod
=
'
position
'
offsetBase
=
this
.
$scrollElement
.
scrollTop
()
offsetBase
=
this
.
$scrollElement
.
scrollTop
()
}
}
this
.
offsets
=
[]
this
.
targets
=
[]
this
.
scrollHeight
=
this
.
getScrollHeight
()
var
self
=
this
this
.
$body
this
.
$body
.
find
(
this
.
selector
)
.
find
(
this
.
selector
)
.
map
(
function
()
{
.
map
(
function
()
{
...
@@ -1892,8 +1889,8 @@ if (typeof jQuery === 'undefined') {
...
@@ -1892,8 +1889,8 @@ if (typeof jQuery === 'undefined') {
})
})
.
sort
(
function
(
a
,
b
)
{
return
a
[
0
]
-
b
[
0
]
})
.
sort
(
function
(
a
,
b
)
{
return
a
[
0
]
-
b
[
0
]
})
.
each
(
function
()
{
.
each
(
function
()
{
self
.
offsets
.
push
(
this
[
0
])
that
.
offsets
.
push
(
this
[
0
])
self
.
targets
.
push
(
this
[
1
])
that
.
targets
.
push
(
this
[
1
])
})
})
}
}
...
@@ -1933,8 +1930,8 @@ if (typeof jQuery === 'undefined') {
...
@@ -1933,8 +1930,8 @@ if (typeof jQuery === 'undefined') {
this
.
clear
()
this
.
clear
()
var
selector
=
this
.
selector
+
var
selector
=
this
.
selector
+
'
[data-target="
'
+
target
+
'
"],
'
+
'
[data-target="
'
+
target
+
'
"],
'
+
this
.
selector
+
'
[href="
'
+
target
+
'
"]
'
this
.
selector
+
'
[href="
'
+
target
+
'
"]
'
var
active
=
$
(
selector
)
var
active
=
$
(
selector
)
.
parents
(
'
li
'
)
.
parents
(
'
li
'
)
...
...
This diff is collapsed.
Click to expand it.
dist/js/bootstrap.min.js
+
1
-
1
View file @
1d892cee
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