twentytwenty
twentytwenty copied to clipboard
Container Wrong Size Until Resize or Handle Click
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?
Did you find a solution or workaround? I'm having issues with it displaying any images until you click on the slider handle.
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.
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??
Have you looked into this issue https://github.com/zurb/twentytwenty/issues/31 I think the 20/20 was attached before images were loaded.
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.