Skip to content
Discussion options

You must be logged in to vote

Hi,

The answer is - yes and no. There is no option for that, but you can place any HTML content over the image.
Here is an example that is using custom attribute for links:

<a
  href="https://lipsum.app/id/1/1600x1200"
  data-fancybox="gallery"
  data-title="Optional title,&lt;br /&gt;that can contain &lt;em&gt;HTML&lt;/em&gt; code"
>
  <img src="https://lipsum.app/id/1/200x150" width="200" height="150" alt="" />
</a>
Fancybox.bind("[data-fancybox]", {
  zoomEffect: false,
  on: {
    "Carousel.contentReady": (_fancybox, _carousel, slide) => {
      if (slide.title) {
        slide.panzoomRef
          ?.getViewport()
          ?.insertAdjacentHTML(
            "beforeend",
            `<…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dmcrlsn
Comment options

Answer selected by dmcrlsn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants