Hi Chi-K,
I have updated the following js code in the: /templates/ja_alpha/html/mod_articles_category/slide.php file:
<script>
(function($){
jQuery(document).ready(function($) {
if ( $(window).width() > 480 ) {
startCarousel();
} else {
$('#mod-articles-<?php echo $module->id; ?> .owl-carousel').addClass('off');
}
$(window).resize(function() {
if ( $(window).width() > 480 ) {
startCarousel();
} else {
stopCarousel();
}
});
function startCarousel(){
$("#mod-articles-<?php echo $module->id; ?> .owl-carousel").owlCarousel({
addClassActive: true,
items: 2,
singleItem : true,
itemsScaleUp : true,
nav : true,
navText : ["<i class='fas fa-arrow-left'></i>", "<i class='fas fa-arrow-right'></i>"],
dots: true,
merge: false,
mergeFit: true,
margin: 36,
slideBy: 1,
autoHeight: false,
animateOut: 'fadeOut',
autoplaySpeed: 1200,
smartSpeed: 1400,
loop: false,
autoplay: false,
responsive : {
0 : {
items: 1,
autoHeight: true
},
767 : {
items: 1,
autoHeight: true
},
1200 : {
items: 2,
autoHeight: false
}
}
});
}
function stopCarousel() {
var owl = $('#mod-articles-<?php echo $module->id; ?> .owl-carousel');
owl.trigger('destroy.owl.carousel');
owl.addClass('off');
}
});
})(jQuery);
</script>
And add the following CSS code to the Backend > Site template styles > JA Alpha - default > Tools > Custom CSS:
/*dominic - cto owl-carousel*/
@media (max-width: 480px) {
.owl-carousel.off {
display: block;
}
.owl-carousel.off .item-inner {
width: 300px;
flex: 0 0 auto;
margin-right: 15px;
}
.owl-carousel.off .item-inner:last-child {
margin-right: 0;
}
.owl-carousel.off {
display: flex;
flex-wrap: nowrap;
overflow-x: scroll;
scroll-behavior: smooth;
justify-content: flex-start;
}
}
You can check your site now.