slickGoTo doesn't scroll at index -2, -3, ...

Created on 18 Mar 2016  路  5Comments  路  Source: kenwheeler/slick

If I use your own example at http://jsfiddle.net/k70vendr/ on issue https://github.com/kenwheeler/slick/issues/960 and extend the slidesToShowup to 5, there I can use slickGoTo with an data-slick-index of -2 and it will be fine.
But if I use the current version 1.5.9 instead of 1.4.0 then the slider doesn't move.
Look at http://jsfiddle.net/4j6a1u22/. Go on _"Item 1"_ and then click on _"Item 6"_.

Do I something wrong or truly a bug?

Author Pending Response Investigating Needs Fiddle

Most helpful comment

fixed in this pull-request:

2285

All 5 comments

Hmmm.... Thanks Xynon...
if you could create a proper JS fiddle with the unminified master branch ( http://jsfiddle.net/simeydotme/fmo50w7n/ ) then I can do some actual debugging and see if this is a bug or an intended change :)

The slick.js source was just embedded like kenwheeler wrote them before. Sorry...
Here is a shorter one: http://jsfiddle.net/m4avag4r/

Hi!

Is there any news on this topic?
I'm stuck with exactly the same bug over here.

thx,
janein

fixed in this pull-request:

2285

Temporary fix:

var index, slickObj;

index = -2;

slickObj = $('.wrapper').slick('getSlick');

if (index <= -2) {
  index += slickObj.slideCount;
}

slickObj.slickGoTo(index);
Was this page helpful?
0 / 5 - 0 ratings

Related issues

REPTILEHAUS picture REPTILEHAUS  路  3Comments

eirikrlee picture eirikrlee  路  3Comments

NozX18 picture NozX18  路  3Comments

Libig picture Libig  路  3Comments

VladPoe picture VladPoe  路  3Comments