sticky icon indicating copy to clipboard operation
sticky copied to clipboard

Disable scrollTop event

Open ghost opened this issue 9 years ago • 2 comments

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...

ghost avatar Nov 20 '15 19:11 ghost

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;

ghost avatar Nov 20 '15 19:11 ghost

Is there a fix to this? It would be nice to not have the content scrolled to the top when its stuck/unstuck.

drewbietron avatar Dec 07 '15 16:12 drewbietron