I try to setup OWL Carousel for Related Products in Magento 2.
I overwrite this file: Magento_Catalog/templates/product/list/items.phtml
this is my custom code:
<div id="owlslider" class="products wrapper grid products-grid products-<?= /* @escapeNotVerified */ $type ?>">
<ol class="products list items product-items">
...............
</ol>
</div>
<script type="text/javascript" xml="space">
(function () {
require(["jquery","owlcarousel"],function() {
'use strict';
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery("#owlslider").owlCarousel({
autoplay: true,
dots: false,
loop:true,
responsiveClass:true,
responsive:{
0:{
items:1,
nav:true
},
600:{
items:3,
nav:false
},
1000:{
items:5,
nav:true,
loop:false
}
}
});
});
});
})();
</script>
But my owl carousel it not display well, I mean inline. My owl carousel items are now one under the other.
What I do wrong there?
Thank you in advance.