aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/affix.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/js/affix.js b/js/affix.js
index 84953c5cd..7d36fff0b 100644
--- a/js/affix.js
+++ b/js/affix.js
@@ -55,8 +55,6 @@
var offsetTop = offset.top
var offsetBottom = offset.bottom
- if (this.affixed == 'top') position.top += scrollTop
-
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
@@ -84,7 +82,7 @@
.trigger($.Event(affixType.replace('affix', 'affixed')))
if (affix == 'bottom') {
- this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
+ this.$element.offset({ top: position.top })
}
}