mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Merge pull request #6118 from godric7/master
scrollSpy - add parent scrollTop to offset calculation
This commit is contained in:
commit
2526c3fdbe
1 changed files with 1 additions and 1 deletions
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…
Add table
Reference in a new issue