diff options
| author | fat <[email protected]> | 2013-12-29 18:04:43 -0800 |
|---|---|---|
| committer | fat <[email protected]> | 2013-12-29 18:04:43 -0800 |
| commit | 162d9e1776ef55d741ffc80f8694c16c40de32ca (patch) | |
| tree | 640fc798a0fd8de15f0027f4690885c569f1f654 /js | |
| parent | 9d73d9c38c440b4863a991da7995a10ae1023b57 (diff) | |
| parent | ed5dbf1b2b8187b6939ab10d75573118d346f970 (diff) | |
| download | bootstrap-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.js | 4 |
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] |
