fancyapps / ui

A library of JavaScript UI components, includes the best lightbox - Fancybox5
https://fancyapps.com/
Other
820 stars 99 forks source link

How do I get a carousel and lightbox with carousel with the same nav arrows? #695

Open ballmannweber opened 1 month ago

ballmannweber commented 1 month ago

I use the simple div-setup from the docs to generate a carousel in a page and use this code for carousel and fancybox. How can I get the custom svg code get used by the arrows in the carousel as well as in the lightbox carousel?

`{# Carousel #} const container = document.getElementById("myCarousel"); const options = { infinite: true, Navigation: { nextTpl: '', prevTpl: '', }, }; new Carousel(container, options);

{# Fancybox #}
Fancybox.bind('[data-fancybox="gallery"]', {
    contentClick: "close",
    closeButton: false,
    Thumbs: false,
    Images: {
        protected: true
    },
    Toolbar: {
        display: {
            left: [],
            middle: [],
            right: [],
        },
    },
});`