slick icon indicating copy to clipboard operation
slick copied to clipboard

CSS transition from last slide to first doesn't work

Open DriftingSteps opened this issue 7 years ago • 9 comments

CSS transition from the last slide to the first (or vice versa) doesn't seem to work. I've had this issue multiple times so my assumption was that maybe I made an error. But I've tried a few slick.js settings and none seem to help. Codepen link below -

https://codepen.io/anon/pen/RxPYeK

Steps to reproduce the problem

  1. Click the 'next' icon on the till you reach the 'slide4' block. As you slide from 'slide1' to 'slide4', you will see a smooth CSS-based transition that changes opacity and transformation. But sliding to 'slide1' from 'slide4' negates the transition animation.
  2. Clicking back to 'slide4' from 'slide1' also negates the animation.

Is this is a known bug? What are the possible solutions to this?

DriftingSteps avatar Dec 15 '17 05:12 DriftingSteps

@DriftingSteps I believe this is related to a couple other existing issues: https://github.com/kenwheeler/slick/issues/3124 https://github.com/kenwheeler/slick/issues/3174

kangabell avatar Jan 10 '18 20:01 kangabell

I am seeing this issue as well.

morgant avatar Jan 14 '18 04:01 morgant

I've experienced this bug too.

I saw on another forum somewhere that if you're using the center mode you can target your animation on slick-center rather than slick-current. If you change the pen on the first comment to target this, the 'jerk' disappears.

However!

If you have double or more slides than the slides to show parameter, even using this class does not remove the jerky animation. I have forked the original pen here to show what I mean

https://codepen.io/PaulBarrett79/pen/NXmMbY

I've added 7 slides instead of 4 and the behaviour returns. This might be of use to someone.

EDIT also, if you have 5 items and 3 to show, you can see the 2nd slide doesn't have the scale down immediately. Weird.

https://codepen.io/PaulBarrett79/pen/aExKeq

PaulBarrett79 avatar Jan 23 '18 16:01 PaulBarrett79

I think this pull request fixes this issue

https://github.com/kenwheeler/slick/pull/3307

PaulBarrett79 avatar Jan 24 '18 12:01 PaulBarrett79

This was ages ago, but I manually added your 'enhanced eq' fix didn't fix it. I still get funky center slide behavior when going from the first to last slide, or vice versa. I have custom styling on the slick-center slick-current but list position shifts and the 1st slide is off the screen.

kirkbross avatar Feb 07 '19 20:02 kirkbross

Here's a fiddle. Go from slide 12 to 1, or 1 to 12...

http://jsfiddle.net/kirkbross/mykcdjt4/

kirkbross avatar Feb 09 '19 05:02 kirkbross

I'm encountering the same. Curiosly this does not happen on the slick.js website in center mode example.

febLey avatar Nov 29 '19 14:11 febLey

Is this issue fixed?, I still have the same bug

sgClaudia98 avatar Sep 25 '20 22:09 sgClaudia98

@PaulBarrett79 - How to do this update on react slick slider

javednoor avatar Feb 07 '24 10:02 javednoor