Hi,
I call some nodes in a lightframe using the lightbox2 module.
A jcarousel is present in those nodes and works pefectly in a html page but when the node is called by the lightbox2 module and the modal windows happens, an alert happens two time :
jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...
If i click the ok button on each time, the third time is ok.

My width and height css items proprierties are set.

I comment the lines 556 to 559 in the jcarousel/jcarousel/lib/jquery.jcarousel.js where the check on the dimension definition is done : the alert disapear but it's very tricky.

var d = this.dimension(e);
/* if (d == 0) {
                    alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');
                    return 0;
                } */

I checked the "d" variable in the firebug console after i have commented this line in adding this line :

console.log(d);

So when the lightframe is loading the d variable take this value :
0
0
250 (it's the css setting width for my items)

Any idea where the problem is ? probably in interaction between jcarousel and lightbox2 but where...

Thanks

Timos

Comments

quicksketch’s picture

Category: bug » support
Status: Active » Closed (fixed)

jCarousel (as far as I know) requires the carousel to be visible on the page in order to calculate its dimensions. This means that you need jCarousel's behaviors to affect the page prior to Lightbox hiding this content.

I'm closing this issue directly due to age and after a lack of activity.