We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3853dce + 027c2da commit 940e751Copy full SHA for 940e751
js/foundation.sticky.js
@@ -47,6 +47,10 @@ class Sticky {
47
this.scrollCount = this.options.checkEvery;
48
this.isStuck = false;
49
$(window).one('load.zf.sticky', function(){
50
+ //We calculate the container height to have correct values for anchor points offset calculation.
51
+ _this.containerHeight = _this.$element.css("display") == "none" ? 0 : _this.$element[0].getBoundingClientRect().height;
52
+ _this.$container.css('height', _this.containerHeight);
53
+ _this.elemHeight = _this.containerHeight;
54
if(_this.options.anchor !== ''){
55
_this.$anchor = $('#' + _this.options.anchor);
56
}else{
0 commit comments