I have a gallery of photos which uses Infinite Scroll as the pager. I am also using the fancyBox module so that when I click each photo it appears in an overlay, with the photos grouped per page so I can cycle through them with the FancyBox overlay.
The problem I have is that I can only cycle through the photos that have already been loaded by the Infinite Scroll (which makes sense as they are the only photos the Infinite Scroll has 'seen'). But what I want is to trigger the infinite scroll to load more photos just before I reach the end of the cycle with the FancyBox overlay so a user can simply use the overlay to cycle through all the photos on the site without having to use Infinite Scroll to load them all first.
Any help with the sort of thing I should be thinking about to try and achieve this?