Initialize slick slider after ajax success

Add following snippet into your ajax success.

if ($('.your_slick_selector').hasClass('slick-initialized')) {
    $('.your_slick_selector').slick('destroy');
}

$( '.your_slick_selector' ).html( response );

$( '.your_slick_selector' ).slick({
    infinite: false,
    slidesToShow: 5,
    slidesToScroll: 5,
});

Leave a Reply