aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorfat <[email protected]>2013-12-29 18:04:43 -0800
committerfat <[email protected]>2013-12-29 18:04:43 -0800
commit162d9e1776ef55d741ffc80f8694c16c40de32ca (patch)
tree640fc798a0fd8de15f0027f4690885c569f1f654 /js
parent9d73d9c38c440b4863a991da7995a10ae1023b57 (diff)
parented5dbf1b2b8187b6939ab10d75573118d346f970 (diff)
downloadbootstrap-162d9e1776ef55d741ffc80f8694c16c40de32ca.tar.xz
bootstrap-162d9e1776ef55d741ffc80f8694c16c40de32ca.zip
Merge branch 'scrollspy-speedy-scroll-top' of git://github.com/ziogaschr/bootstrap into ziogaschr-scrollspy-speedy-scroll-top
Conflicts: dist/js/bootstrap.min.js
Diffstat (limited to 'js')
-rw-r--r--js/scrollspy.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/scrollspy.js b/js/scrollspy.js
index 02054bdb8..fecd8a446 100644
--- a/js/scrollspy.js
+++ b/js/scrollspy.js
@@ -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]