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
0f366e03
Commit
0f366e03
authored
Jan 22, 2014
by
Tobias Lindig
Committed by
Chris Rebert
Mar 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct event naming of `scroll` and `load' event
closes #12337
parent
b7ab7998
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
dist/js/bootstrap.js
dist/js/bootstrap.js
+2
-2
js/scrollspy.js
js/scrollspy.js
+2
-2
No files found.
dist/js/bootstrap.js
View file @
0f366e03
...
@@ -1578,7 +1578,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
...
@@ -1578,7 +1578,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this
.
$element
=
$
(
element
).
is
(
'
body
'
)
?
$
(
window
)
:
$
(
element
)
this
.
$element
=
$
(
element
).
is
(
'
body
'
)
?
$
(
window
)
:
$
(
element
)
this
.
$body
=
$
(
'
body
'
)
this
.
$body
=
$
(
'
body
'
)
this
.
$scrollElement
=
this
.
$element
.
on
(
'
scroll.bs.scroll
-spy.data-api
'
,
process
)
this
.
$scrollElement
=
this
.
$element
.
on
(
'
scroll.bs.scroll
spy
'
,
process
)
this
.
options
=
$
.
extend
({},
ScrollSpy
.
DEFAULTS
,
options
)
this
.
options
=
$
.
extend
({},
ScrollSpy
.
DEFAULTS
,
options
)
this
.
selector
=
(
this
.
options
.
target
this
.
selector
=
(
this
.
options
.
target
||
((
href
=
$
(
element
).
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
||
((
href
=
$
(
element
).
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
...
@@ -1702,7 +1702,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
...
@@ -1702,7 +1702,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// SCROLLSPY DATA-API
// SCROLLSPY DATA-API
// ==================
// ==================
$
(
window
).
on
(
'
load
'
,
function
()
{
$
(
window
).
on
(
'
load
.bs.scrollspy.data-api
'
,
function
()
{
$
(
'
[data-spy="scroll"]
'
).
each
(
function
()
{
$
(
'
[data-spy="scroll"]
'
).
each
(
function
()
{
var
$spy
=
$
(
this
)
var
$spy
=
$
(
this
)
$spy
.
scrollspy
(
$spy
.
data
())
$spy
.
scrollspy
(
$spy
.
data
())
...
...
js/scrollspy.js
View file @
0f366e03
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
this
.
$element
=
$
(
element
).
is
(
'
body
'
)
?
$
(
window
)
:
$
(
element
)
this
.
$element
=
$
(
element
).
is
(
'
body
'
)
?
$
(
window
)
:
$
(
element
)
this
.
$body
=
$
(
'
body
'
)
this
.
$body
=
$
(
'
body
'
)
this
.
$scrollElement
=
this
.
$element
.
on
(
'
scroll.bs.scroll
-spy.data-api
'
,
process
)
this
.
$scrollElement
=
this
.
$element
.
on
(
'
scroll.bs.scroll
spy
'
,
process
)
this
.
options
=
$
.
extend
({},
ScrollSpy
.
DEFAULTS
,
options
)
this
.
options
=
$
.
extend
({},
ScrollSpy
.
DEFAULTS
,
options
)
this
.
selector
=
(
this
.
options
.
target
this
.
selector
=
(
this
.
options
.
target
||
((
href
=
$
(
element
).
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
||
((
href
=
$
(
element
).
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
// SCROLLSPY DATA-API
// SCROLLSPY DATA-API
// ==================
// ==================
$
(
window
).
on
(
'
load
'
,
function
()
{
$
(
window
).
on
(
'
load
.bs.scrollspy.data-api
'
,
function
()
{
$
(
'
[data-spy="scroll"]
'
).
each
(
function
()
{
$
(
'
[data-spy="scroll"]
'
).
each
(
function
()
{
var
$spy
=
$
(
this
)
var
$spy
=
$
(
this
)
$spy
.
scrollspy
(
$spy
.
data
())
$spy
.
scrollspy
(
$spy
.
data
())
...
...
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