Hi @smit_ralph,
@bradvin is correct that the issue here is being caused by the way Owl Carousel is cloning the DOM but it is only occurring due to FooBox initializing itself before Owl has performed its manipulations. Simply calling FOOBOX.init()
again fixes the issue as FooBox can then inspect the altered DOM and bind itself appropriately.
To fix this I would make two changes, the first one is simple as you have done it on your test site https://mghia.nl/vin/. Simply add the foobox
class to the owl-carousel
element in the DOM. This lets FooBox see that DIV as a container for items and creates a single modal containing multiple items rather than multiple modals with a single item in each as is currently happening on your https://crystallize.nl/ site.
The second change requires some custom JS however this should also be fairly straight forward as I see you have created a child theme to house your modifications, onelight-child. Inside this child theme you have an includes/extras.js
file. At the top of this file you initialize Owl Carousel and also have a callback for the onInitialized
event on line 26. This is the same place where you created the custom JS to add the foobox
CSS class to the owl-stage
, which is not required. In this callback we should just need to add the code FOOBOX.init()
so that your callback looks like the following:
onInitialized: function(e) {
if (carItems >= e.item.count) {
car.trigger('stop.owl.autoplay');
} else {}
FOOBOX.init();
}
Once that’s done I’m hoping everything should be working as expected.
Thanks
Steve