|
|
@ -286,7 +286,8 @@ $.fn.sticky = function(parameters) { |
|
|
|
context.offset.left += scrollContext.left; |
|
|
|
} |
|
|
|
module.cache = { |
|
|
|
fits : ( element.height < scrollContext.height ), |
|
|
|
fits : (element.height <= scrollContext.height), |
|
|
|
sameHeight : (element.height == context.height), |
|
|
|
scrollContext : { |
|
|
|
height : scrollContext.height |
|
|
|
}, |
|
|
@ -467,6 +468,7 @@ $.fn.sticky = function(parameters) { |
|
|
|
cachedPosition = scroll || $scroll.scrollTop(), |
|
|
|
cache = module.cache, |
|
|
|
fits = cache.fits, |
|
|
|
sameHeight = cache.sameHeight, |
|
|
|
element = cache.element, |
|
|
|
scrollContext = cache.scrollContext, |
|
|
|
context = cache.context, |
|
|
@ -486,8 +488,7 @@ $.fn.sticky = function(parameters) { |
|
|
|
doesntFit = !fits, |
|
|
|
elementVisible = (element.height !== 0) |
|
|
|
; |
|
|
|
|
|
|
|
if(elementVisible) { |
|
|
|
if(elementVisible && !sameHeight) { |
|
|
|
|
|
|
|
if( module.is.initialPosition() ) { |
|
|
|
if(scroll.top >= context.bottom) { |
|
|
|