Klaus Hartl schrieb:
Here's what I did - it's a hack and you could do better but it works for
now and you get the picture:
I added a flexibleWidth option and than added the following lines to the
init method:
// Mod - allow flexible width
if (priv.o.flexibleWidth)
jQuery(window).bind('resize', function() {
var jCarouselClip = jQuery(".jcarousel-clip", priv.scope);
var jCarouselClipAvailWidth =
parseInt(jCarouselClip[0].parentNode.offsetWidth - 2 * 40);
jCarouselClip.css({ width: jCarouselClipAvailWidth });
jCarouselClip.find('li').css({ width:
Math.ceil(jCarouselClipAvailWidth / priv.o.itemVisible) });
priv.dimension = i.offsetWidth + priv.margin(i, "marginLeft") +
priv.margin(i, "marginRight");
priv.resize();
priv.animate(); // readjust left positioning
});
Would be cool if you could add that in a more proper way if you like
that :-)
Scratch that "2 * 40", that is special to my project, just needed to get
that in as fast as possible...:
var jCarouselClipAvailWidth = jCarouselClip[0].parentNode.offsetWidth;
-- Klaus