How to configure 'No loop' in v5? #572
-
I have a gallery of images. If I click 'Next' the next image is displayed. 'Next' at the last image of the gallery displays the the first one. In fancybox v3 there was a configuration attribute 'loop' that could be set to 'false' to stop 'next' at the last image (or 'prev' at the fist image). In fancyapps v5 I can not find an equivalent configuration option. How can I configure 'no loop'? Thanks for any hints. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Hi, Fancybox is built around Carousel component, therefore you simply use Fancybox.bind('[data-fancybox="gallery"]', {
Carousel : {
infinite: false
}
}); |
Beta Was this translation helpful? Give feedback.
-
I have a gallery with fancybox v5. Please help me! I need when i press button class="f-button" title="Toggle slideshow" data-fancybox-toggle-slideshow, start a audio file from html. |
Beta Was this translation helpful? Give feedback.
Hi,
Fancybox is built around Carousel component, therefore you simply use
infinite
option, like this:https://jsfiddle.net/srz68gx3/