miromannino / Justified-Gallery

Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
http://miromannino.github.io/Justified-Gallery/
MIT License
1.68k stars 299 forks source link

Gallery with Infinite Scroll strange behaviour #298

Open SMorgan21 opened 5 years ago

SMorgan21 commented 5 years ago

Hi guys,

I have a set of 512 images, I would like to load 40 images from that set when the page is loaded and then each time the user hits the bottom of the page I would like to load another 40. At the moment I can load 40 images that are exactly the same and when a user hits the scroll point ALL of the images load. I have tried to include a way of of keeping track of the images that have ben loaded but that does not seem to work at the moment and Im not sure why?!!

Also the strange behaviour I am reffering to occurs when the scroll point is reached, the Ajax call is made and the data returned but the infinite scroll does not kick in but when you scroll for a second time the infinite gallery works?

If someone out there could give me a rough idea of where ive gone wrong I would be very greatful.

Thanks In Advance

<!DOCTYPE html>

DLG JSON TEST
shudack commented 2 years ago

Did you manage to solve the problem that you had to load the images dynamically? I have the same scenario with 750 images and I would like do the same approach you mentioned.