There is a photo gallery on the facybox 3. It is necessary to add a block below each photo that contains text and a link. The link will be equally styled and have the same href under each photo. I tried to use data-caption , but in html it looks awful when a lot of text is obtained and a lot of photos. Using 'beforeLoad': function() tried to add an element, but it is added several times. How can I stylize a caption block, add text there depending on the selected picture and if there is no description, then just leave a link under the photo? Or for this purpose, you can use another plugin? Grateful for the help
$('[data-fancybox]').fancybox({ 'beforeLoad': function(){ $('.fancybox-caption').append('<a href="#">TEST</a>');; } }); 