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

Multiple sticky element in one column #71

Open
jarred-cz opened this issue Sep 13, 2014 · 2 comments
Open

Multiple sticky element in one column #71

jarred-cz opened this issue Sep 13, 2014 · 2 comments

Comments

@jarred-cz
Copy link

Hello,

I spent several hours trying to figure it out, but I must give up.
This great plugin works like a charm, but unfortunatelly not in my scenario. So I would like to asked you for help.

Situation:
I have two columns - the left one is very tall and the right contains next two columns + box which is under those columns.
Example: http://jsfiddle.net/jdz89bn1/1/
Live "demo": http://preview.skymedia.cz/skutrportal/sticky.html (sticky) / http://preview.skymedia.cz/skutrportal/nosticky.html (without sticky)

What I am trying to do:
The yellow and orange columns should scroll down (each column has different height) and if they reach the pink box, all those elements should scroll down until they reach the bottom of the very tall left column (lightblue).

It is even possible with this plugin?

The closest catch was that all columns scroll quite good, but their positions jumps randomly up and down during scrolling (IMHO because of nested fixed/absolute positioning).

image

image

Thank you very much for any kind of help.

@courdek
Copy link

courdek commented Sep 14, 2014

If anything in your sidebar is loaded asynchronously you should trigger the recalc event upon completion. I experienced issues with this with tabbed content in the sidebar. Because the content within tabs was of variable height, the initial calculated height was no longer accurate. I fixed it by adding a callback.

I can confirm that triggering recalc on your site fixes the issue after load. Looks to me like it's something to related to the images loading in late. I didn't have time to investigate further but hope this helps!

@jarred-cz
Copy link
Author

Thank you very much for tip, but unfortunately it doesn't work. I add "$(document.body).trigger('sticky kit:recalc');" 5 sec after page is loaded (when everything is loaded, I am sure), but no change...

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