I have implemented OwlCarousel 1.3.3 on a website, similar to the sync example shown on the official owl website ():
var owlconfig = {
singleItem: true,
navigation: false,
pagination: false,
afterAction: syncCarousels
};
$('.image-gallery').owlCarousel(owlconfig);
The function syncCarousels does not contain any problematic code causing lag, as the issue still persists even without using it.
Below is the HTML structure of the carousel after initializing the JS:
<div class="image-gallery owl-carousel owl-theme">
<div class="owl-wrapper-outer">
<div class="owl-wrapper">
... (carousel item markup here)
</div>
</div>
In the desktop view, everything functions smoothly. However, when testing on an iPhone or iPad, there is a noticeable lag while swiping. The swipe action delays for about 500ms before registering.
The page where the carousel exists contains various HTML elements, texts, and images. Removing some of these elements improves the performance of the owlCarousel, but this is not a sustainable solution.
How can the performance of the carousel be enhanced? Even the "noSupport3d" option in OwlCarousel, utilizing jQuery animate, shows better performance.