question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Going from first to last slide, or from last to first slide, on infinite mode doesn't animate

See original GitHub issue

Hey there. In my solution, I wanted the next/previous slides to have a scale of 75%, and the centered one with 100% scale.

I’m using the following settings:

$('#slick-carousel').slick({
        autoplay: true,
        arrows: false,
        centerMode: true,
        dots: true,
        slidesToShow: 1,
        centerPadding: '295px',
        infinite: true
});

In my CSS I have the following:

#slick-carousel .slick-slide.slick-active.slick-center {
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
        transform: scale(1);
}
#slick-carousel .slick-slide {
        -webkit-transform: scale(0.75);
        -ms-transform: scale(0.75);
        -o-transform: scale(0.75);
        transform: scale(0.75);
        -webkit-transition: all .3s linear;
        -o-transition: all .3s linear;
        transition: all .3s linear;
}

It works great, unless when I slide from last to first slide, or from the first to last slide. Any thoughts on that? I’d appreciate any help.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
bbodiencommented, Jan 4, 2017

This doesn’t seem to be fixed in 1.6.0 yet.

As @nickmelville described, when transitioning from the first or last slide to the cloned one on an infinite Slick slider, the slick-active class isn’t applied to the clone.

It feels wrong having to resort to centerMode: true to work around the problem.

5reactions
chrisandrewclcommented, Dec 1, 2017

First, thanks @kenwheeler for this awesome piece of work!

For those of you who are still facing this issue in the 1.8.0 version, I was able to get rid of it by downgrading to 1.6.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slick carousel animation blinking after the last slide / cloned ...
The CSS3 animation doesn't apply and users experience a blink. One way to avoid the bug animation at the end of infinite rotation...
Read more >
slick slider - css transition infinite loop bug - Stack Overflow
With Slick Slider, adding a delay to the transition helps to make it ... the animation looks OK when sliding from last to...
Read more >
Set the start time and speed of an animation effect
To start the animation when you click the slide, select On Click. To start the animation at the same time as the previous...
Read more >
PowerPoint Slide Doesnt Move! - Presentation Process
Comments for PowerPoint Slide Doesn't Move!​​ Solution: Go to your slideshow tab > Custom Slideshow and check if you have any listed there...
Read more >
How to loop and auto advance your Google Slides - YouTube
Presenting in a team meeting with Google Slides, but don't want to manually change each slide when it's time? In this episode of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found