Damien -

I just got this working myself in a dynamically loaded carousel:

First, add an initCallback to get a handle on the jcarousel object and
save it in a global:

myCarousel = null; // This will be the carousel object
myData = [...]; // This is the data for the carousel

function onInitCarousel(carousel, state) {
    if (state == 'init') {
        myCarousel = carousel;
    }
}

function myItemLoadCallback(carousel, state) {
    // build your items from myData[...] here
}

$('#mycarouseldev').jcarousel({
                    size: myData.length,
                    initCallback: onInitCarousel,
                    itemLoadCallback: {onBeforeAnimation:
myItemLoadCallback},
                    wrap: 'last',
                    scroll: 3
                });

Then, when it is time to reset the carousel:

function resetData() {
    myData = [...] // set the new data
    myCarousel.reset();
}

Hope this helps,
Bob

On Oct 1, 4:20 am, Anatalsceo <[EMAIL PROTECTED]> wrote:
> Thejcarouselplug works really great. I only have a  problem with 
> theresetfunction.
>
> I try on a page to change the content of the carousel without
> reloading the page.
> I'm using for this the $(document).ready(function() {} in order to
> change the carousel on a click.
>
> It doesn't quite work and I was wondering how could I get thereset
> function to work. It always freezes firefox when using it.
>
> regards,
>
> Damien

Reply via email to