Filth
Filth

Reputation: 3228

Jquery Jcarousel use multiple instances

Ok so I have two instances on a page where I am using Jquery Jcarousel but here is the snag...

One of the instances is a "slideshow" or "image gallery" so I need the carousel to cycle one by one however...

In the footer I have another instance where a list of "facts" are cycling at a cycle rate of 3 at a time.

How can I get around this so I can basically have my cake and eat it too?

I want to be able to have the slideshow cycle one by one AND have the "facts" list to cycle 3 items at a time.

I have tried copying and renaming the function to something else like "facts" but this did not work.

This is the plugin I am using: http://sorgalla.com/jcarousel/

Help!

Upvotes: 0

Views: 3099

Answers (1)

Praveen Kumar Purushothaman
Praveen Kumar Purushothaman

Reputation: 167182

It is there in their documentation:

jQuery(document).ready(function() {
    // Initialise the first and second carousel by class selector.
    // Note that they use both the same configuration options (none in this case).
    jQuery('.first-and-second-carousel').jcarousel();

    // If you want to use a caoursel with different configuration options,
    // you have to initialise it seperately.
    // We do it by an id selector here.
    jQuery('#third-carousel').jcarousel({
        vertical: true
    });
});

Upvotes: 3

Related Questions