diff options
author | billy gates <Jacobthornton@gmail.com> | 2012-12-08 02:11:18 +0400 |
---|---|---|
committer | billy gates <Jacobthornton@gmail.com> | 2012-12-08 02:11:18 +0400 |
commit | 2526c3fdbeb67732400b5cd5fce8d64de1eeee1a (patch) | |
tree | 062a112d89f668208db6bfd1fca39ce52de624d8 /js | |
parent | a7eb9c294a575b5471ddec45ae75e1d09f7ace4c (diff) | |
parent | 8b959cacbc26666c13fd0e893a3f563ac4f9d09e (diff) |
Merge pull request #6118 from godric7/master
scrollSpy - add parent scrollTop to offset calculation
Diffstat (limited to 'js')
-rw-r--r-- | js/bootstrap-scrollspy.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index fd82872c5c..07a5c3a584 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 () { |