D
D
Diversia2019-08-27 20:24:55
JavaScript
Diversia, 2019-08-27 20:24:55

How to use title or alt instead of data-caption in fancybox 3?

Can you please tell me how to use title or alt instead of the data-caption attribute in fancybox 3 to display them under the enlarged image? I tried many options that are available in the search, but none helped.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Glorious Cat, 2019-08-28
@Diversia

There are examples in the documentation.

R
raxweb, 2021-02-22
@raxweb

Here is a great official example: https://codepen.io/fancyapps/pen/aaerxw
It has a description in a tag I put the description for thumbnails and enlarged images in a span instead of a title: aceweb.ru/articles/ajax/fancybox-caption.php These two examples make it possible to format the description with html tags.
<figcaption>Описание к картинке</figcaption>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question