I've setup jcarousel to dynamically load elements as they disappear and then have them reappear
now it's given me an error saying: "No width/height set for items."
I've tried the hack described here: http://old.nabble.com/jCarousel:-No-width-height-set-for-items.-td13913308s27240.html
and it caused firefox to crash (probably because it's looping constantly)
any ideas?
You need to set an explicit height on the .jcarousel-clip container
jQuery('#mycarousel').jcarousel(
{
auto : 2,
scroll : 1,
wrap : 'last',
initCallback : mycarousel_initCallback,
itemFallbackDimension: 300
});
So ignore my comment response to @TALLBOY. I was able to fix this issue by specifying a width for div.carousel-container which is an element that is added by the code when the carousel is initialized.
I stumbled across this during my searches:
http://github.com/jsor/jcarousel/issuesearch?state=open&q=width#issue/22
Guys this should work
.jcarousel-list li { height:??px; width: ??px; }
When you put your height and width in, in your css file it should appear.
来源:https://stackoverflow.com/questions/3417524/jcarousel-infinite-loop-no-width-or-height-set