D
D
Darklt2021-04-28 15:03:53
fancyBox
Darklt, 2021-04-28 15:03:53

Why does the fancybox slider stop working if I change the a attribute to a div?

Replaced attribute a with div

<div class="fancy "  data-fancybox-href="/img/2.jpg"></div>
<div class="fancy "  data-fancybox-href="/img/3.jpg"></div>
<div class="fancy "  data-fancybox-href="/img/4.jpg"></div>

and replaced href with data-fanvybox

With tag a, it scrolls when opened., with div no, it opens only 1 picture.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question