kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.54k stars 5.89k forks source link

3 slides with 3 to show, still scrolls #63

Closed Smashman closed 10 years ago

Smashman commented 10 years ago

Sorry if you're sick of me!

I have 3 slides on a 3 slidesToShow carousel, but it's scrolling, giving me lots of empty space after 2 scrolls.

http://smash.mn/s/1396391076.png

kenwheeler commented 10 years ago

Can you paste your html and js settings?

Smashman commented 10 years ago
$(function(){
    $('.images').slick({
        slidesToShow:1,
        slidesToScroll:1,
        dots:true,
        arrows:false,
        draggable:false,
        autoplay:true,
        autoplaySpeed:6000,
        responsive:[
            {
                breakpoint: 744,
                settings: {
                    slidesToShow:3,
                    slidesToScroll:1,
                    dots:true,
                    arrows:false,
                    draggable:false,
                    autoplay:true,
                    autoplaySpeed:6000
                }
            }
        ]
    });
    $('.slick-slide img').click(function(event){
        $('.images').slickPause();
        var image = $(event.target)[0].src;
        $('#image_zoom img').attr({"src":image});
        $("#image_zoom, #image_darken").show();
    });
    $('#image_zoom, #image_darken').click(function(){
        $('.images').slickPlay();
        $("#image_zoom, #image_darken").hide();
    });
});
<div class="images">
    <div><img src="http://smash.mn/s/1396378889.jpg"></div>
    <div><img src="http://smash.mn/s/1396379045.jpg"></div>
    <div><img src="http://smash.mn/s/1396379761.png"></div>
</div>
kenwheeler commented 10 years ago

Wow. Now THAT is a great fuckin catch. Good shit man. Committing in a second.

Smashman commented 10 years ago

I'm just glad you're not annoyed by the constant issues :+1:

kenwheeler commented 10 years ago

One man's issues are another man's well needed QA

kenwheeler commented 10 years ago

Ok fixed

kenwheeler commented 10 years ago

Thanks again