V
V
Vasily Khryagin2021-02-11 10:58:31
JavaScript
Vasily Khryagin, 2021-02-11 10:58:31

How to add a caption to an image in fancybox?

How is the title and description output implemented here ? There is a figurecaption and apparently js takes the content from there and displays it in the popup. But I can't find this js code here

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
iBird Rose, 2021-02-11
@iiiBird

data-caption https://codepen.io/fancyapps/pen/EeqJPG?editors=1000

A
Alexey Yarkov, 2021-02-11
@yarkov

Well, the examples have everything
jsfiddle.net/cWNw9
Add markup to the container and display it as a title and description.

R
raxweb, 2021-02-22
@raxweb

Another example and script for displaying a title from a span:
aceweb.ru/articles/ajax/fancybox-caption.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question