Closed bitsdisasters closed 10 years ago
Hi,
are you using parts of the example-api, example-endless-scroll or something like that? It would help if you provide the complete JS-code.
Regards
I got the same issue when tried with endless-scroll. I figured out that if there is one of wrong images url return from ajax (image not found) ,all images wil have src="undefined". below is code i modified from example-endless-scroll to to reproduce the issue (../sample-images/image_11.jpg is not found) function onScroll(event) { .... //../sample-images/image_11.jpg is not found. so below line of code will make make all image have src='undefined' var item ='<li><img src="../sample-images/image_11.jpg" width="200" height="267"><p>30</p></li>' $('#tiles').append(item); applyLayout(); };
I've just comitted a new imagesLoaded plugin. Could you try if it works better?
When plugin makes its jobs and resizes the elements with images, all the src for images are lost and theirs values goes to 'undefined'. When page loads it shows one column. After that, when it is reallocating elements, the images disappear and src values change to 'undefined'. I'm sending some screenshots attached. This is not happening in other device or browse than webkit in my iOS app.
These are the settings:
// Prepare layout options. var options = { itemWidth: 140, // Optional min width of a grid item autoResize: true, // This will auto-update the layout when the browser window is resized. container: $('.discover-grid-container'), // Optional, used for some extra CSS styling offset: 20, // Optional, the distance between grid items flexibleWidth: 200 // Optional, the maximum width of a grid item }; Thank you for your help