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

Only work properly when I resize my browser manually #58

Closed
peterEycyeh opened this issue Apr 10, 2019 · 3 comments
Closed

Only work properly when I resize my browser manually #58

peterEycyeh opened this issue Apr 10, 2019 · 3 comments
Labels

Comments

@peterEycyeh
Copy link

Hi, I really like this repo. It is amazing, especially in version 2. quite clean and easy to implement. However, the parallax always work properly when I resize my browser manually. Thus, I think it is because of the cache, but I update updating the cache when image load, it seems nothing happened. Even I set a timer say update the cache after 5 second. Would you please give me a hint to let me know if there is anything that might cause the issue? Thank you so much!

@peterEycyeh
Copy link
Author

Because I have a video(around 10 second) on initial load. I am not sure if that affect. And Is it possible to set a timeout to force it update(re-calculate) after video end. Thank you!

@jscottsmith
Copy link
Owner

@peterEycyeh definitely cache related. Can you share a repo or live site with me, then I can probably help out.

@jscottsmith
Copy link
Owner

jscottsmith commented Apr 10, 2019

Try updating cache after the video meta data loads. See here

The height/width should be known at that point and cache will need to be updated with those values.

Alternatively, set a width/height on the video or container, so that the parallaxed element isn't dependent on loading assets.

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

No branches or pull requests

2 participants