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:
commit
2526c3fdbe
2
js/bootstrap-scrollspy.js
vendored
2
js/bootstrap-scrollspy.js
vendored
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user