开发者

jcarousellite items jump places in scroll when number of items isn't divisible by scroll number

开发者 https://www.devze.com 2023-04-11 11:07 出处:网络
I have jCarouselLite ( http://www.gmarwaha.com/jquery/jcarousellite/#doc ) running on one of my pages, and have an issue with scrolling.

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 t开发者_C百科o 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消