0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-07 04:54:24 +01:00

Use document scroll height instead of offset height to support body with absolute height

This commit is contained in:
Lukáš Doležal 2013-12-05 16:28:31 +01:00
parent aac4f0189e
commit 6e9efb2024

View File

@ -73,7 +73,7 @@
this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : '')) this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
if (affix == 'bottom') { if (affix == 'bottom') {
this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() }) this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
} }
} }