aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorbilly gates <[email protected]>2012-12-07 14:11:18 -0800
committerbilly gates <[email protected]>2012-12-07 14:11:18 -0800
commit2526c3fdbeb67732400b5cd5fce8d64de1eeee1a (patch)
tree062a112d89f668208db6bfd1fca39ce52de624d8 /js
parenta7eb9c294a575b5471ddec45ae75e1d09f7ace4c (diff)
parent8b959cacbc26666c13fd0e893a3f563ac4f9d09e (diff)
downloadbootstrap-2526c3fdbeb67732400b5cd5fce8d64de1eeee1a.tar.xz
bootstrap-2526c3fdbeb67732400b5cd5fce8d64de1eeee1a.zip
Merge pull request #6118 from godric7/master
scrollSpy - add parent scrollTop to offset calculation
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 fd82872c5..07a5c3a58 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 () {