1

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?

chrisjlee
  • 21,691
  • 27
  • 82
  • 112
  • Do you have a link to the site so I can see the code? – TALLBOY Aug 05 '10 at 17:41
  • @TALLBOY - I put a working example of the error that Chris might be seeing here http://jsfiddle.net/xv7yN/. This example only throws an error in IE6 (surprise surprise) - I blew away the code that was causing an error in all browsers - but I will try and post a full browser example soon. – malonso Sep 15 '10 at 18:25

4 Answers4

6
jQuery('#mycarousel').jcarousel(
{
    auto : 2,
    scroll : 1,
    wrap : 'last',
    initCallback : mycarousel_initCallback,
    itemFallbackDimension: 300
});
Rüdiger Hanke
  • 6,215
  • 2
  • 38
  • 45
ThmHarsh
  • 601
  • 7
  • 7
1

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.

jelly46
  • 243
  • 3
  • 14
1

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

malonso
  • 2,247
  • 1
  • 21
  • 33
1

You need to set an explicit height on the .jcarousel-clip container

Mazatec
  • 11,481
  • 23
  • 72
  • 108
  • That's `.jcarousel-item`for the Drupal module. Assign any random width; it will be overwritten automatically… – cptstarling Jan 08 '16 at 17:00