0

I want to enter custom HTML as the title, like this:

$(".fancybox").fancybox({
  padding: 0,
  title: '<a href="http://www.google.com">Hello</a>'
});

...but I also want a gallery of images.

I don't think you can have both as each gallery should use the same code above, but each unique title needs a separate implementation of the above code. Is this possible?

Also, is there a better way to set say 20 images, all in the same gallery and all with custom title content. At the moment I'm guessing I would need to specify each one individually using this code:

$("#fancybox-number-1").fancybox({
  padding: 0,
  title: 'custom-title-1'
});

(...but of course the gallery won't work and even if it did, specifying this 20 times sounds bad practice to me.)

How do I specify custom title, and have a gallery of 20 or so images in the best way possible?

user1612824
  • 11
  • 1
  • 3

0 Answers0