Slick: Update documentation on slidesToScroll

Created on 19 Sep 2014  路  10Comments  路  Source: kenwheeler/slick

Apparently, if centerMode is set to true, slidesToScroll is set to 1. Either fix it so that centerMode does not affect slidesToScroll or update the documentation, so I don't need to dig through the code to figure it out.

Feature Request

Most helpful comment

+1 for your change @eschow . Works for my set even with some breakpoints in it. Though in current version of slick the part to adjust looks some different, I removed

        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
            _.options.slidesToScroll = 1;
        }

on Line 494:496 in slick/slick.js. Maybe it helps someone else.

All 10 comments

Easy there Seabass. Will do.

Thanks! Didn't mean to be threatening.

@SeabassNg lol I'm messing with you. I'm from New Jersey, everything is threatening.

With center mode set to false and when image coutn is equal to image display setted in .slider-nav navigation is not working
For 4 images:

 $('.slider-for').slick({
    slidesToShow: 1,
    slidesToScroll: 1,
    arrows: false,
    fade: true,
    asNavFor: '.slider-nav'
});
$('.slider-nav').slick({
    slidesToShow: 4,
    slidesToScroll: 1,
    asNavFor: '.slider-for',
    arrows: false,
    centerMode: false,
    focusOnSelect: true
});

..and You can click on thumbnails to death without results.
Changed to slidesToShow: 3, - works again,
changed to centerMode: true, - works again

Why would you set center mode to false? You aren't overriding a default.

No matter what, if "slidesToShow" is equal (or bigger) to number of images navigation not work.
If You try set simple navigated slider, for exampl\e display 3 thumbnail below 3 images, and "slidesToShow" is set to "3" navigation do not work. Must be set =< 2 to working again.
Is it feature? "slidesToShow" must be < count of all images in set?

If all the slides are showing, what are you gonna slide ?

Not, thumbnails from nawigation div.slider-nav are showing, but not swiching image in div.slider-for after click

Glad to see that this is something that other people have experienced. Fantastic tool and am about to dig in to see if I can fix. No guarantees.

+1 for your change @eschow . Works for my set even with some breakpoints in it. Though in current version of slick the part to adjust looks some different, I removed

        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
            _.options.slidesToScroll = 1;
        }

on Line 494:496 in slick/slick.js. Maybe it helps someone else.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yangkennyk picture yangkennyk  路  3Comments

barzev picture barzev  路  3Comments

hoghamburg picture hoghamburg  路  3Comments

jeremymandel picture jeremymandel  路  3Comments

jamesinealing picture jamesinealing  路  3Comments