Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollToFixed div 'jumps' to the limit #213

Open
Galaxianz opened this issue Mar 18, 2016 · 1 comment
Open

ScrollToFixed div 'jumps' to the limit #213

Galaxianz opened this issue Mar 18, 2016 · 1 comment

Comments

@Galaxianz
Copy link

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?

@jordotech
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants