aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob <[email protected]>2013-12-24 13:21:19 -0800
committerJacob <[email protected]>2013-12-24 13:21:19 -0800
commit139b395dfbb6898746dfc3c0b03966d126b68750 (patch)
tree24e6cba5f6d093f529ad50f91d155310af5496be
parenta93a753c7d50aadbdb9a0243a9aa04f366855e46 (diff)
parent626cef9fa40a3759753383ff61d5ebde32bd9a18 (diff)
downloadbootstrap-139b395dfbb6898746dfc3c0b03966d126b68750.tar.xz
bootstrap-139b395dfbb6898746dfc3c0b03966d126b68750.zip
Merge pull request #10359 from ixti/patch-1
Pass $element to offset top/bottom calc funcs
-rw-r--r--js/affix.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/affix.js b/js/affix.js
index 2fbafc6a8..94d3cc224 100644
--- a/js/affix.js
+++ b/js/affix.js
@@ -57,8 +57,8 @@
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' :