Accessing plugin instance

Accessing plugin instance

I’ve got a carousel plugin that I’m using. It’s pretty basic, but works perfectly for what we need it for. Here’s the code: http://code.google.com/p/jquery-infinite-carousel/source/browse/trunk/jquery.infinite-carousel.js?r=2

 

Here’s the scenario: I’ve got a page with two carousels on it. I’m setting these up on document ready with this:

 

$(“#carousel1”).carousel(options…);

$(“#carousel2”).carousel(options…);

 

Both are set up and working properly on the page.

 

Now, from an outside user click I need to tell #carousel2, to move to the 4th item. I can handle writing the code perform the advance of the carousel items. The part I don’t get is how I talk to #carousel2 from the outside after it’s initialized.

 

I’m assuming I’ll need to modify the plug-in source, and that’s fine with me.

 

Can any one point me in the right direction?

    • Topic Participants

    • scott