Commit 1ceab8b8 authored by joep.joosten@ihomer.nl's avatar joep.joosten@ihomer.nl
Browse files

Fix: IE10 or lower incorrectly determines the scrollheight of the body. Use...

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.
parent 3bcb1cc2
Showing with 1 addition and 1 deletion
+1 -1
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
ScrollSpy.prototype.process = function () { ScrollSpy.prototype.process = function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 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 maxScroll = scrollHeight - this.$scrollElement.height()
var offsets = this.offsets var offsets = this.offsets
var targets = this.targets var targets = this.targets
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment