P
P
Pavel2017-06-07 10:21:56
JavaScript
Pavel, 2017-06-07 10:21:56

How to set fancybox options for data-fancybox="gallery"?

For the class I use

$(".fancybox").fancybox({
        //опции
    });

but how to set options for data-fancybox="gallery" tag?
fancyapps.com/fancybox/3

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2017-06-07
@mrusklon

So?

$("[data-fancybox='gallery']").fancybox({
        //опции
    });

D
Dima Pautov, 2017-06-07
@bootd

Have you read the doc at all?
fancyapps.com/fancybox/3/docs/#options
Scroll down, there is this thing:

<a data-fancybox data-options='{"caption" : "My caption", "src : "iframe.html"}' href="javascript:;">
  Open external page using iframe
</a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question