Slick JQuery: TypeError Cannot Read Property 'unslick' Of Undefined
I've done an ajax call to retrieve data and I want to put the images in a Slick carousel. The problem is - I've read - Slick only see static data, so I've to turn-off turn-on Slick
Solution 1:
Ok, here is the solution! (yay)
Slick var or something similar was 'undefined' for that carousel.
So we bind it to the Slick var with our settings:
function getSliderSettings() {
return {
dots: true,
arrows: false,
slidesToShow: 1,
cssEase: 'ease',
variableWidth: false,
speed: 800,
fade: true,
cssEase: 'linear'
}
}
$('.product_carousel').slick(getSliderSettings());
Apparently there's no need to do $('your_carousel_class').slick('unslick').slick();
Post a Comment for "Slick JQuery: TypeError Cannot Read Property 'unslick' Of Undefined"