this.scrollCount = this.options.checkEvery;
this.isStuck = false;
$(window).one('load.zf.sticky', function(){
+ //We calculate the container height to have correct values for anchor points offset calculation.
+ _this.containerHeight = _this.$element.css("display") == "none" ? 0 : _this.$element[0].getBoundingClientRect().height;
+ _this.$container.css('height', _this.containerHeight);
+ _this.elemHeight = _this.containerHeight;
if(_this.options.anchor !== ''){
_this.$anchor = $('#' + _this.options.anchor);
}else{