diff --git a/src/definitions/modules/sticky.js b/src/definitions/modules/sticky.js index d362b3114..c8dfad019 100644 --- a/src/definitions/modules/sticky.js +++ b/src/definitions/modules/sticky.js @@ -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, diff --git a/src/themes/default/modules/sticky.variables b/src/themes/default/modules/sticky.variables index 08e3bdc84..083c364d3 100644 --- a/src/themes/default/modules/sticky.variables +++ b/src/themes/default/modules/sticky.variables @@ -2,11 +2,6 @@ Sticky *******************************/ -@transitionDuration: 0.2s; -@transition: - width @transitionDuration @defaultEasing, - height @transitionDuration @defaultEasing, - top @transitionDuration @defaultEasing, - bottom @transitionDuration @defaultEasing -; +@transitionDuration: @defaultDuration; +@transition: none; @zIndex: 800; \ No newline at end of file