0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge pull request #6118 from godric7/master

scrollSpy - add parent scrollTop to offset calculation
This commit is contained in:
billy gates 2012-12-07 14:11:18 -08:00
commit 2526c3fdbe

View File

@ -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 () {