sticky
sticky copied to clipboard
Disable scrollTop event
Hello,
The plugin is amazing! I am new to jQuery, but I was able to get right in and this functional beyond my expectations.... The problem I am having is that I can't figure out how to disable the scrollTop event from happening when a sticky element is displayed. I need the sticky element to .fadeOut/In without repositioning the window.
Would you mind sharing some thoughts on disabling the scroll event?
Thanks again for the plugin... Brilliant...
I am guessing I would adjust lines 42-46 (see below), but when I comment it out, it breaks the plugin...
scroller = function() {
var scrollTop = $window.scrollTop(),
documentHeight = $document.height(),
dwh = documentHeight - windowHeight,
extra = (scrollTop > dwh) ? dwh - scrollTop : 0;
Is there a fix to this? It would be nice to not have the content scrolled to the top when its stuck/unstuck.