JCarousel wrap set to 'circular' bug

2019-08-08 19:50发布

I'm trying to set up a JCarousel instance with the wrap set to circular, however, I noticed an issue where I "inspect element" in Chrome, duplicate <li> elements are added to the html when the slides repeat (it can be viewed on the official example page).

http://sorgalla.com/projects/jcarousel/examples/static_circular.html

I know this is an open bug on GitHub. I'm just wondering if anyone has found a temporary workaround.

4条回答
混吃等死
2楼-- · 2019-08-08 20:29

I won infinite duplicating <li> Just add style

.jcarousel-clip {width:198px; height:130px;}
查看更多
劳资没心,怎么记你
3楼-- · 2019-08-08 20:33

in the jcarousellite script file change the circular: true, to false or add this parameter to your script as below

$(".class").jCarouselLite({circular: false});

查看更多
在下西门庆
4楼-- · 2019-08-08 20:34

i solve it with giving the li items explicit width and height in the css

.jcarousel-item {width:200px;height:200px;}
查看更多
我只想做你的唯一
5楼-- · 2019-08-08 20:41

I had the same bug before, and didn't see any helpful comments, so I thought I'd suggest a "better" plugin. Try jQuery Cycle Plugin. Worked for me!

查看更多
登录 后发表回答