mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-14 09:34:36 +02:00
Merge branch 'scrollspy-speedy-scroll-top' of git://github.com/ziogaschr/bootstrap into ziogaschr-scrollspy-speedy-scroll-top
Conflicts: dist/js/bootstrap.min.js
This commit is contained in:
6
dist/js/bootstrap.js
vendored
6
dist/js/bootstrap.js
vendored
@@ -1572,6 +1572,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
|
|||||||
|
|
||||||
return ($href
|
return ($href
|
||||||
&& $href.length
|
&& $href.length
|
||||||
|
&& $href.is(':visible')
|
||||||
&& [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
|
&& [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
|
||||||
})
|
})
|
||||||
.sort(function (a, b) { return a[0] - b[0] })
|
.sort(function (a, b) { return a[0] - b[0] })
|
||||||
@@ -1594,6 +1595,11 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
|
|||||||
return activeTarget != (i = targets.last()[0]) && this.activate(i)
|
return activeTarget != (i = targets.last()[0]) && this.activate(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (activeTarget && scrollTop <= offsets[0]) {
|
||||||
|
debugger
|
||||||
|
return activeTarget != (i = targets.first()[0]) && this.activate(i)
|
||||||
|
}
|
||||||
|
|
||||||
for (i = offsets.length; i--;) {
|
for (i = offsets.length; i--;) {
|
||||||
activeTarget != targets[i]
|
activeTarget != targets[i]
|
||||||
&& scrollTop >= offsets[i]
|
&& scrollTop >= offsets[i]
|
||||||
|
2
dist/js/bootstrap.min.js
vendored
2
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -74,6 +74,10 @@
|
|||||||
return activeTarget != (i = targets.last()[0]) && this.activate(i)
|
return activeTarget != (i = targets.last()[0]) && this.activate(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (activeTarget && scrollTop <= offsets[0]) {
|
||||||
|
return activeTarget != (i = targets[0]) && this.activate(i)
|
||||||
|
}
|
||||||
|
|
||||||
for (i = offsets.length; i--;) {
|
for (i = offsets.length; i--;) {
|
||||||
activeTarget != targets[i]
|
activeTarget != targets[i]
|
||||||
&& scrollTop >= offsets[i]
|
&& scrollTop >= offsets[i]
|
||||||
|
Reference in New Issue
Block a user