Answer the question
In order to leave comments, you need to log in
Loading new slides in Slick via ajax?
Hello. There are two related slick sliders, the bottom line is that initially, when the page is loaded, they should contain 10 slides, but when scrolling, for example, up to 9 slides, another 10 slides should be loaded into both sliders, etc. (Sorry for the tautology :))
Is it possible to implement this in slick, and how?
Answer the question
In order to leave comments, you need to log in
Hang the afterChange event handler, inside which you check the number of the current slide. If necessary, add new slides using the slickAdd method:
$slick.on('afterChange', function(e, slick, slide) {
if (slide какой надо) {
$(this).slick('slickAdd', новыеСлайды);
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question