From: Lukáš Doležal Date: Thu, 5 Dec 2013 15:28:31 +0000 (+0100) Subject: Use document scroll height instead of offset height to support body with absolute... X-Git-Tag: v3.1.0~136^2~22^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e9efb2024e76d72ae1b39eaa2fda9f01ff7a28f;p=thirdparty%2Fbootstrap.git Use document scroll height instead of offset height to support body with absolute height --- 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() }) } }