Update: I don't think it's a JS binding issue, this part actually seems okay.
The problem seems to be related to the anchor link element not getting the ari-fancybox class (and group/gallery data attributes).
When the page first loads, and everything works correctly, the image links have the appropriate class and attributes:
<a href="
url.to.image/image.jpg" data-fancybox-group="fb_gallery_0_0" class="ari-fancybox" data-fancybox="fb_gallery_0_0">
<img src="
url.to.image/image_thumbnail.jpg">
</a>
However after the ajax process, the newly created image links no longer have the class/data attributes:
<a href="
url.to.image/image.jpg">
<img src="
url.to.image/image_thumbnail.jpg">
</a>
If I manually add the class/data attributes, the lightbox popups work as expected, suggesting that it's not a JS binding issue. Not sure what is the best solution, for now I have a workaround to programmatically include the class and data attributes, which works fine.
Thanks!