aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorGodric <[email protected]>2012-12-04 01:21:07 +0100
committerGodric <[email protected]>2012-12-04 01:21:07 +0100
commit8b959cacbc26666c13fd0e893a3f563ac4f9d09e (patch)
tree3bbd8e9407a4d2e8850a7e57ded843f5855edf8e /js
parent3b3dd3ac3c7b69d02406ede69bffcc4ee8a1ed6b (diff)
downloadbootstrap-8b959cacbc26666c13fd0e893a3f563ac4f9d09e.tar.xz
bootstrap-8b959cacbc26666c13fd0e893a3f563ac4f9d09e.zip
Update js/bootstrap-scrollspy.js
Fix for Bootstrap issue #6013 "scrollSpy - offset calculation" https://github.com/twitter/bootstrap/issues/6013
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-scrollspy.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js
index 3ffda2ebe..ace6b8703 100644
--- a/js/bootstrap-scrollspy.js
+++ b/js/bootstrap-scrollspy.js
@@ -59,7 +59,7 @@
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& $href.length
- && [[ $href.position().top, href ]] ) || null
+ && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {