Jānis Skarnelis
Jānis Skarnelis
Here is a working example with your HTML structure: ```js Fancybox.bind('figure a', { groupAll: true, caption: function (_fancybox, slide) { const figcaption = slide.triggerEl?.parentElement.querySelector( "figcaption" ); return figcaption ? figcaption.innerHTML...
Title attribute is a string, not HTML element :) ```js caption: function (_fancybox, slide) { const title = slide.triggerEl?.querySelector('img').getAttribute('title'); return title || slide.caption || ''; }, ``` https://jsfiddle.net/qu6f8roy/
Hi, It also seems to work as intended in v5.
I updated previous demo to v5, and it works fine - https://codesandbox.io/s/smoosh-microservice-6s1elt?file=/src/index.js
But why do you use Bootstrap modal in the first place? Fancybox supports multiple open instances, so, you can use Fancybox to display modal with images and clicking them can...
Hi, Here is an example of how to create a custom toolbar button in v5: https://fancyapps.com/fancybox/plugins/toolbar/#custom-button https://jsfiddle.net/1oj7zt9v/ And here is an example of how to create a sidebar - https://stackblitz.com/edit/js-ktcv4h?file=index.js
Hi, v5 has been released recently and it offers more functionally, see this example - https://fancyapps.com/fancybox/#transformation-controls
Hi, v5 has been released recently and button elements are used not only for carousel dot navigation, but also for thumbnails.
Hi, I just wanted to note that v5 is a recent release and it doesn't auto-bind and you can also pass a container to attach the click event to.
Hi, Fancybox5 has been available for some time and comes with TS types.