From 6e9efb2024e76d72ae1b39eaa2fda9f01ff7a28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Dole=C5=BEal?= Date: Thu, 5 Dec 2013 16:28:31 +0100 Subject: [PATCH] Use document scroll height instead of offset height to support body with absolute height --- js/affix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/affix.js b/js/affix.js index 552bffa3fe..e025e20562 100644 --- a/js/affix.js +++ b/js/affix.js @@ -73,7 +73,7 @@ this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : '')) if (affix == 'bottom') { - this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() }) + this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() }) } }