In the documentation of fancybox v.3 says "Sometimes you might need to bind fancybox to dynamically added elements. Use selector...". Everything is fine, but I need to disable the automatic grouping of galleries and customize multiple gallery selector.
Default behavior:
$().fancybox({
selector : '[data-fancybox]:visible'
});
All visible links with data-fancybox will be merged into ONE gallery. I need to create different galleries according to the values of data-fancybox, like data-fancybox="gallery1", data-fancybox="gallery2", etc. At the same time, fancybox should continue to listen to dynamically added content.
Can you help me, please?
data-fancybox
from all links and manual init of fancybox with other selector than default? :) – Synge