You can trigger an event ‘post-load’ on the document after new content has been loaded. FancyBox will then become aware of the new content.
That depends on how you are loading your content… Did you create the ajax script yourself or is it included in a plugin or your theme?
Hi, a quick look at the Ajax Load More plugin does not reveal to me that it’s triggering the common “post-load” event after new posts are loaded. You might want to ask the developer to add it.
Or ask for an example of how you could trigger it yourself as there does seem to be the option to define a custom jQuery function by the name almDone() that will be run after the post load animation…
(added the ajax-load-more tag to this thread)
Jumping in here.
I’m the developer of Ajax Load More.
I just helped a user solve this issue by adding the following to his theme and hooking into the almComplete callback that is dispatched from core Ajax Load More.
$.fn.almComplete = function(alm){
$(document.body).trigger('post-load');
};
Hope this helps others.