ScrollToFixed icon indicating copy to clipboard operation
ScrollToFixed copied to clipboard

ScrollToFixed div 'jumps' to the limit

Open Galaxianz opened this issue 8 years ago • 1 comments

After much playing around in an attempt to learn and apply ScrollToFixed, I've managed to get the ScrollToFixed work correctly, except for one thing: the div 'jumps' to the bottom limit before it's supposed to.

Accessible example: http://area51.shortstories101.com/story/look-me-in-the-eye/

I found it difficult getting the limit to set correctly with what should be the correct method, but I had to offset it by manually setting some pixels. Here's the code and you'll see what I mean:

$('.below-head-sticky').scrollToFixed({ marginTop: (75 + topbar_height), minWidth: 1000, limit: function() { return ($('#footer_owrap').offset().top - $('.below-head-sticky').outerHeight(true) - 200); } });

The "200" there is the anomaly that may be a hint with this problem because, in my opinion, it should've worked correctly without that offset.

Does anyone have any suggestions?

Galaxianz avatar Mar 18 '16 10:03 Galaxianz

I'm having the same issue but I see you managed to fix it on your site...

jordotech avatar Oct 22 '17 20:10 jordotech