3

I have jCarouselLite ( http://www.gmarwaha.com/jquery/jcarousellite/#doc ) running on one of my pages, and have an issue with scrolling.

I have it set to always show 3 items, and to scroll 3 items at a time, and cirular set to true.

$(".carousel-1").jCarouselLite({
        btnNext: ".carousel-next-1",
        btnPrev: ".carousel-prev-1",
        circular:true,
        easing: 'easeInOutCubic',
        speed: 600,
        scroll: 3,
        visible: 3
});

No problem unless the total number of items is not divisible by 3 - in which case, when you are aproaching the last item in the list, the visible items will 'jump' 1 place to the left as the carousel updates the content.

An obvious workaround would be to limit the number of results to something divisible by 3, needless to say this isn't a good option.

Anyone else have this issue?

totallyNotLizards
  • 8,489
  • 9
  • 51
  • 85
  • Also have this issue. Did you find a solution in the end? – noShowP Nov 25 '11 at 11:39
  • @noShowP no, unfortunately I didn't find a fix for this. I *could* have probably worked something out myself by editing the source, but unfortunately time constraints prevented me from doing that. I just ended up not using continuous mode. – totallyNotLizards Nov 25 '11 at 12:34
  • however, you could scroll by only 1 item and that works fine (or work out if there is a whole number less than the total that the total is divisible by, and scroll by that, else 1) – totallyNotLizards Nov 28 '11 at 09:52
  • 1
    I needed to scroll by 6 every time rather than 1. I've currently implemented a "quick fix" by duplicating the list items myself until they are divisible by 6 and then initializing the carousel. This does work however when I have more time I will be trying to find a more elegant solution. – noShowP Nov 28 '11 at 11:29
  • well done, not a bad workaround. I think there is probably a way to fix the slider but it's monday and i don't want to do the maths :D – totallyNotLizards Nov 28 '11 at 13:51

1 Answers1

1

I just limited the number of results to something divisible by three, after trying everything I could think of.

I even had a trawl through the source code and tried patching it myself, however I didn't get too far due to time constraints. I'd say a fix is possible if someone had the time to spend on it.

totallyNotLizards
  • 8,489
  • 9
  • 51
  • 85