Commit e84b0c04 authored by Mike Robinet's avatar Mike Robinet

Adjust for Scrollspy offset when calculating maxScroll.

parent ceda9483
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,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 = this.options.offset + scrollHeight - this.$scrollElement.height()
var offsets = this.offsets var offsets = this.offsets
var targets = this.targets var targets = this.targets
var activeTarget = this.activeTarget var activeTarget = this.activeTarget
......
Markdown is supported
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