mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-04-24 22:14:43 +00:00
Fix: IE10 or lower incorrectly determines the scrollheight of the body. Use document.documentElement for IE. To make this browser agnostic, the maximum scrollheight of both body and documentElement is used.
This commit is contained in:
parent
3bcb1cc255
commit
1ceab8b89f
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
ScrollSpy.prototype.process = function () {
|
||||
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
||||
var scrollHeight = this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)
|
||||
var scrollHeight = this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
|
||||
var maxScroll = scrollHeight - this.$scrollElement.height()
|
||||
var offsets = this.offsets
|
||||
var targets = this.targets
|
||||
|
|
|
|||
Loading…
Reference in a new issue