You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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: