0

I need a slider with two rows. Found a solution in jQuery google group.

Works, but wrong. :) With option "circular: true" scrolled into the void. Posted an example to understand what i mean: http://test.demx.info/carousel/

How do fix it?

demx
  • 53
  • 1
  • 2
  • 9
  • In the source code of the page you provided, `circular: true` isn't defined. Please enable `circular: true` – Barrie Reader Feb 02 '11 at 09:45
  • refer this http://stackoverflow.com/questions/13392397/two-row-slider-with-horizontal-line-and-vertical-line/14376284#14376284 – Kader-timon Feb 23 '13 at 09:15

1 Answers1

0

There is a bug in jCarousel_Lite. Here is fixed jCarousel_Lite code as a plain text and here it is, zipped.

If you are curious on what was wrong: author checked for two different conditions if user reached the end of carousel' list - first, when circular is true, he checked it like this: if (to <= o.start - v - 1) and if (to >= itemLength - v + 1). The second check, when circular is set to false, he checked it like this: if (to < 0 || to > ((itemLength - v) / o.rows)). What have i done is just changed if (to <= o.start - v - 1) and if (to >= itemLength - v + 1) to if (to < 0) and if (to > ((itemLength - v) / o.rows)). And it works! =)

shybovycha
  • 11,556
  • 6
  • 52
  • 82