问题
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