jQuery('document').ready(function ($){ if ( jQuery('.ct-carousel').length > 0 ) { $(".ct-carousel").slick({ dots: false, infinite: true, slidesToShow: 3, slidesToScroll: 3, autoplay: true, lazyLoad: 'ondemand', responsive: [ { breakpoint: 1023, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 700, settings: { slidesToShow: 1, slidesToScroll: 1 } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] }); } });