-
Notifications
You must be signed in to change notification settings - Fork 492
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
Calculated topSpacing #124
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a header element on our page that changes size if we scroll. If we scroll down it hides completely and if we scroll up, its getting visible again. That means we want two different topSpacing for our sticky sidebar. Close to the top border of the window (30px) if we scroll down and no header is visible. If we scroll up again, we want the sticky sidebar to move down the size of the header (100px), so that there are 30px between header and sidebar. The sidebar position should then be 130px instead of 30px if no header is visible.
We COULD do this easly with a custom function for topSpacing that calculates this positon but it seems like the position is only set if the affixed type changes. But the affixed type will of cource not change, because its still the same type, even though the position vaule has changed. Is there a way to get that calculated topSpacing working for our project?
The text was updated successfully, but these errors were encountered: