slickGoto does not work correctly in afterChange event callback

Created on 20 Apr 2016  路  3Comments  路  Source: kenwheeler/slick

In a slider's afterChange event, the slickGoTo method doesn't work - it seems that the afterChange event is not fired at the right time as slickGoTo is returning instead of doing what it is supposed to do

[ https://jsfiddle.net/y3Lyvys7/3/ ]

use this jsfiddle to reproduce your bug:
https://jsfiddle.net/y3Lyvys7/3/
we will likely close your issue without it.

Steps to reproduce the problem

  1. In the JSFiddle, click on the second slide in the top (red) slider.
  2. Click back to the first slide

What is the expected behaviour?

The top slider and bottom slider are synced with asNavFor. In the afterChange callback of the bottom slider, there is a slickGoTo method to go to the 3rd slide. The sliders should always go to the 3rd slide after changing slides in the top slider.

What is observed behaviour?

The bottom slider does not go to the 3rd slide when changing slides.

More Details

  • Which browsers/versions does it happen on?
    Every one.
  • Which jQuery/Slick version are you using?
    Latest
  • Did this work before?
    Not sure
Investigating

Most helpful comment

Fiddle

waitForAnimate: false -> then you do not need to wait.

All 3 comments

updated with master: https://jsfiddle.net/vd4Lgjqb/

Fiddle

waitForAnimate: false -> then you do not need to wait.

Nice @mazzaker!

Was this page helpful?
0 / 5 - 0 ratings