Tuesday, July 28, 2009

[jQuery] Re: jcarousel: How to call reload() as a result of user action outside of the carousel?

HI

try this
Code :

var theModelCarousel = null;

function clearModelCarousel() {
    theModelCarousel.reset();
}

function modelCarousel_initCallback(carousel) {
    theModelCarousel = carousel;
};
displaySlideShow = function(){
    $('#mycarousel').jcarousel({
        initCallback: modelCarousel_initCallback,
        itemLoadCallback: mycarousel_itemLoadCallback
    });
}
function mycarousel_itemLoadCallback(carousel, state){
};
function mycarousel_itemAddCallback(carousel, first, last, xml){
};


call function clearModelCarousel for reload jcarousel

Regards
Ranga

On Tue, Jul 28, 2009 at 11:04 AM, KevinL <kevinlew15@gmail.com> wrote:

Hi, I have a question about jcarousel.  I want to display three sets
of images on a Web page, and I want to use only one jcarousel to do
it.  I want to change the list of images based on the user clicking on
one of three links, each representing a set of images.  How do I do
this?  I know I can edit the DOM to modify the list of items, but how
do I call jcarousel's reload() function?

Kevin

P.S.  I thought of using three instances of jcarousel, but that takes
up too much screen space and requires the user to scroll too much.

No comments: