Commit 162d9e17 authored by fat's avatar fat
Browse files

Merge branch 'scrollspy-speedy-scroll-top' of...

Merge branch 'scrollspy-speedy-scroll-top' of git://github.com/ziogaschr/bootstrap into ziogaschr-scrollspy-speedy-scroll-top

Conflicts:
	dist/js/bootstrap.min.js
parents 9d73d9c3 ed5dbf1b
No related merge requests found
Showing with 11 additions and 1 deletion
+11 -1
......@@ -1572,6 +1572,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
return ($href
&& $href.length
&& $href.is(':visible')
&& [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
})
.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)
}
if (activeTarget && scrollTop <= offsets[0]) {
debugger
return activeTarget != (i = targets.first()[0]) && this.activate(i)
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
......
This diff is collapsed.
......@@ -74,6 +74,10 @@
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--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment