From: Jacob Date: Tue, 24 Dec 2013 21:21:19 +0000 (-0800) Subject: Merge pull request #10359 from ixti/patch-1 X-Git-Tag: v3.1.0~136^2~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=139b395dfbb6898746dfc3c0b03966d126b68750;p=thirdparty%2Fbootstrap.git Merge pull request #10359 from ixti/patch-1 Pass $element to offset top/bottom calc funcs --- 139b395dfbb6898746dfc3c0b03966d126b68750 diff --cc js/affix.js index 2fbafc6a8e,84760779d5..94d3cc224c --- a/js/affix.js +++ b/js/affix.js @@@ -54,11 -56,9 +54,11 @@@ 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() - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() + if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :