JCarousel wrap set to 'circular' bug

孤街醉人 提交于 2019-12-11 08:57:13

问题


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.


回答1:


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

.jcarousel-item {width:200px;height:200px;}



回答2:


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!




回答3:


I won infinite duplicating <li> Just add style

.jcarousel-clip {width:198px; height:130px;}



回答4:


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

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



来源:https://stackoverflow.com/questions/4890955/jcarousel-wrap-set-to-circular-bug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!