|
|
@ -294,14 +294,14 @@ $.fn.sticky = function(parameters) { |
|
|
|
window = module.cache.window, |
|
|
|
delta = module.get.scrollChange(scroll), |
|
|
|
maxScroll = (element.height - window.height + settings.offset), |
|
|
|
currentScroll = module.get.currentElementScroll(), |
|
|
|
possibleScroll = (currentScroll + delta), |
|
|
|
elementScroll = module.get.currentElementScroll(), |
|
|
|
possibleScroll = (elementScroll + delta), |
|
|
|
elementScroll |
|
|
|
; |
|
|
|
if(module.cache.fits || possibleScroll < 0) { |
|
|
|
elementScroll = 0; |
|
|
|
} |
|
|
|
else if (possibleScroll > maxScroll ) { |
|
|
|
else if(possibleScroll > maxScroll ) { |
|
|
|
elementScroll = maxScroll; |
|
|
|
} |
|
|
|
else { |
|
|
@ -404,7 +404,9 @@ $.fn.sticky = function(parameters) { |
|
|
|
bottom : cachedPosition + offset + window.height |
|
|
|
}, |
|
|
|
direction = module.get.direction(scroll.top), |
|
|
|
elementScroll = module.get.elementScroll(scroll.top), |
|
|
|
elementScroll = (fits) |
|
|
|
? 0 |
|
|
|
: module.get.elementScroll(scroll.top), |
|
|
|
|
|
|
|
// shorthand
|
|
|
|
doesntFit = !fits, |
|
|
|