diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/bootstrap-scrollspy.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index ea29f2f86..47b485785 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -57,11 +57,18 @@ , process: function () { var scrollTop = this.$scrollElement.scrollTop() + this.options.offset + , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight + , maxScroll = scrollHeight - this.$scrollElement.height() , offsets = this.offsets , targets = this.targets , activeTarget = this.activeTarget , i + if (scrollTop >= maxScroll) { + return activeTarget != (i = targets.last()[0]) + && this.activate ( i ); + } + for (i = offsets.length; i--;) { activeTarget != targets[i] && scrollTop >= offsets[i] |
