Search code examples
jquerydrupaljquery-isotopepageload

jQuery Isotope loading issue


I am actually trying to build a image gallery with jquery Isotope. I dont know why, but sometimes the gallery works perfectly and sometimes it has some kind of loading issue as you can see in my screenshot.

Source: www.sarahraaber.com

enter image description here

I already added a timer on pageload and the document loaded function to the head of my .js file. :-/ Any ideas how to work around that?


Solution

  • I have seen this before when using Isotope, it is usually a JS timing issue. Can you add a setTimeout() with a long timer of say 2000 within the initialisation or callback functions, then test to see if it still happens? That should help confirm.

    I have also noticed on your site that resizing the browser clears up the layout issues. Try calling the Isotope update function once all has loaded to correctly update the layout.