Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #24160

    I noticed a problem with my masonry galeries (flexible grid galery) and the Foobox plugin.

    Foobox is well instanced for the first eight pictures, and then the image doesn’t open in a lightbox but in a white window.

    An example :

    On an image of the first or second line, the Foobox lightbox is opened properly but not on an image of the third line and the following lines…

    Could you check what’s wrong ?



    Deactivate the prettyPhoto plugin. Go to js > avia.js then find this code

    //activates the prettyphoto lightbox

    Replace it with

    //activates the prettyphoto lightbox

    Maybe there is a conflict between the two lightbox plugin.




    Thank you Ismael.

    I’ve followed your instructions to desactivate the prettyPhoto plugin but it’s still the same problem…


    You need to “bind” the foobox lightbox/effect to the masonry grid items. If you scroll down new items will be loaded and foobox doesn’t recognize them if you don’t bind it to these items/elements. Kriesi uses the imagesLoaded event to bind the prettyphoto lightbox to the new grid elements and you can probably use it for foobox too. Open up wp-contentthemesflashlightjsjquery.masonry.min.js and search for:


    Replace the avia_activate_lightbox() function with your foobox function call and it should work. If you don’t know the exact code please contact the plugin author and ask him for detailed instructions.


    Thanks Dude!

    A Foobox developer sent me the Foobox function call : window.FOOBOX.init();

    Now Foobox is opened properly for all the pictures of the masonry galery. But after the 8th picture, when we click on a thumbnail it doesn’t open the correct picture… A bit embarassing!

    Any idea?


    Tbh I’ve no idea why it doesn’t work because I’m not familiar with the foobox code. Personally I’d try to bind it to the container element with


    because window.FOOBOX.init() will probably include all images (background slider, masonry gallery, etc.) but I’m not sure if this works out.


    This piece of code doesn’t work either. I’m waiting for a reply from a Foobox developer.



    I hope he can provide a solution. If possible please share it – it may help other users too.

    Best regards,


Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Masonry and Foobox’ is closed to new replies.