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

Container Wrong Size Until Resize or Handle Click #128

Open
rebeccab08 opened this issue Oct 12, 2021 · 5 comments
Open

Container Wrong Size Until Resize or Handle Click #128

rebeccab08 opened this issue Oct 12, 2021 · 5 comments

Comments

@rebeccab08
Copy link

rebeccab08 commented Oct 12, 2021

I have had the image slider working for a while now but all of a sudden I am experiencing something bizarre. My Image Slider loads with the container larger than the images. If I click on the handle to move it or resize, then it corrects itself.

I have tried adding

$(window).on("load", function () {
      $(window).trigger("resize.twentytwenty");
}); 

but it didn't change anything. Any ideas?
Screen Shot 2021-10-14 at 2 12 24 PM

@lampyvision
Copy link

Did you find a solution or workaround? I'm having issues with it displaying any images until you click on the slider handle.

@rebeccab08
Copy link
Author

No I did not. I am using it in Squarespace and I noticed that if I put the same code in a code block vs using a gallery block it works....even though its the exact same code... very confusing.

@rebeccab08
Copy link
Author

rebeccab08 commented Apr 11, 2022

I have still not found a solution. I have tried setting a timeout feature as well as the imagesloaded code. It seems to miscalculate the height of the slider until I click the handle or resize the screen even if I have the timeout set to way past when the images load. Anyone have any ideas??

@vladdancer
Copy link

Have you looked into this issue #31
I think the 20/20 was attached before images were loaded.

@rebeccab08
Copy link
Author

Have you looked into this issue #31 I think the 20/20 was attached before images were loaded.

Yes, I have tried to set a timeout. I have also tried the images loaded strategy. Sometimes it will load and other times it won't. It seems to be worse if I have more than one on a page.

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

No branches or pull requests

3 participants