Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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 : http://www.benoitrual.com/?p=184

    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 ?

    #122595

    Hi,

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

    //activates the prettyphoto lightbox
    if(jQuery.fn.avia_activate_lightbox)
    jQuery('body').avia_activate_lightbox();

    Replace it with

    //activates the prettyphoto lightbox
    //if(jQuery.fn.avia_activate_lightbox)
    //jQuery('body').avia_activate_lightbox();

    Maybe there is a conflict between the two lightbox plugin.

    Regards,

    Ismael

    #122596

    Thank you Ismael.

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

    #122597

    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:

    container.avia_activate_lightbox();

    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.

    #122598

    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?

    #122599

    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

    container.FOOBOX.init();

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

    #122600

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

    #122601

    Hey!

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

    Best regards,

    Peter

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

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