F
F
freeman02042017-10-23 00:25:17
JavaScript
freeman0204, 2017-10-23 00:25:17

The rows and slidesPerRow options do not work in slick. How to fix?

You need to arrange 3 items in 3 rows.
I do it like this:

$('.slider-for').slick({
        slidesToShow: 1,
        slidesToScroll: 1,
        arrows: false,
        dots: false,
        asNavFor: '.slider-nav'
    });
    $('.slider-nav').slick({
        slidesToShow: 9,
        slidesToScroll: 0,
        arrows: false,
        dots: false,
        rows: 3,
        slidesPerRow: 3,
        asNavFor: '.slider-for'
    });


Here is pug:

.col-lg-5
.slider-for
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                .col-lg-7
                  .slider-nav
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')
                    .item
                      img(src='../images/photo-1.png')


And this is what happens if you apply
rows: 3,
 slidesPerRow: 3,


It turns out one item and in it all these slides. And you can't click on them. It is necessary that you can click on them, on each separately.
59ed0c434b979184299141.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question