Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbilly gates <Jacobthornton@gmail.com>2012-12-08 02:11:18 +0400
committerbilly gates <Jacobthornton@gmail.com>2012-12-08 02:11:18 +0400
commit2526c3fdbeb67732400b5cd5fce8d64de1eeee1a (patch)
tree062a112d89f668208db6bfd1fca39ce52de624d8 /js/bootstrap-scrollspy.js
parenta7eb9c294a575b5471ddec45ae75e1d09f7ace4c (diff)
parent8b959cacbc26666c13fd0e893a3f563ac4f9d09e (diff)
Merge pull request #6118 from godric7/master
scrollSpy - add parent scrollTop to offset calculation
Diffstat (limited to 'js/bootstrap-scrollspy.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 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 () {