• Resolved stephenevans

    (@stephenevans)


    Hi there,

    The Foobox gallery works when the gallery is only showing a limited number of items but when you click to show all the images, the lightbox gallery breaks completely. I am appending the images exactly the same with the foobox class and gallery rel. However, it doesn’t seem to be working.

    Is there a way around this?

    Thanks,
    Stephen

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support elviiso

    (@elviiso)

    Hi @stephenevans

    The issue you’re experiencing is due to the images being loaded via lazy loading or AJAX when the “Load More” button is clicked. However, the FooBox JavaScript is initialized on page load, and FooBox attributes can only be added to the images available on the page at that time.

    As a result, the images loaded via lazy loading or AJAX after clicking “Load More” do not have the FooBox attribute added to them hence cannot trigger FooBox to open them when clicked. To test this, simply run the FOOBOX.init() function call in the console after clicking “Load More,” as demonstrated in this linked image: screenshot link

    This will reload the FooBox JavaScript, adding the FooBox elements to the images and enabling you to open them using FooBox.

    To resolve this issue, you’ll need to either disable lazy loading or ensure that the FOOBOX.init() function is executed when that button, which triggers the lazy loading or AJAX functionality, is clicked. You may require assistance from your developer to implement this solution.

    Thanks

    Kind regards,
    Elvis

Viewing 1 replies (of 1 total)
  • The topic ‘Images not opening in lightbox when show more button is clicked’ is closed to new replies.