|
@ -347,6 +347,9 @@ $.fn.sticky = function(parameters) { |
|
|
}, |
|
|
}, |
|
|
scroll: function(scroll) { |
|
|
scroll: function(scroll) { |
|
|
module.debug('Setting scroll on element', scroll); |
|
|
module.debug('Setting scroll on element', scroll); |
|
|
|
|
|
if(module.elementScroll == scroll) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if( module.is.top() ) { |
|
|
if( module.is.top() ) { |
|
|
$module |
|
|
$module |
|
|
.css('bottom', '') |
|
|
.css('bottom', '') |
|
@ -418,10 +421,6 @@ $.fn.sticky = function(parameters) { |
|
|
elementVisible = (element.height !== 0) |
|
|
elementVisible = (element.height !== 0) |
|
|
; |
|
|
; |
|
|
|
|
|
|
|
|
// save current scroll for next run
|
|
|
|
|
|
module.save.lastScroll(scroll.top); |
|
|
|
|
|
module.save.elementScroll(elementScroll); |
|
|
|
|
|
|
|
|
|
|
|
if(elementVisible) { |
|
|
if(elementVisible) { |
|
|
|
|
|
|
|
|
if( module.is.initialPosition() ) { |
|
|
if( module.is.initialPosition() ) { |
|
@ -487,6 +486,10 @@ $.fn.sticky = function(parameters) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// save current scroll for next run
|
|
|
|
|
|
module.save.lastScroll(scroll.top); |
|
|
|
|
|
module.save.elementScroll(elementScroll); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
bindTop: function() { |
|
|
bindTop: function() { |
|
|