Try doing something like this; <script type="text/javascript"> var theModelCarousel = null;
function modelCarousel_initCallback(carousel) { theModelCarousel = carousel; // Callback functuions if needed }; jQuery(document).ready(function() { jQuery('#modelCarousel').jcarousel({ initCallback: modelCarousel_initCallback // Other settings if needed }); }); function clearModelCarousel() { theModelCarousel.reset(); theModelCarousel.add(0,someImageURL1); theModelCarousel.add(1,someImageURL2); theModelCarousel.size(2); } </script> I set a global variable reference to the carousel from the init callback funtion. The global can then be accessed from your other functions. On Apr 24, 11:57 am, TomDB <debru...@gmail.com> wrote: > I'm also trying to have access to thejcarouselobject. there are a > couple of methods accessbile via a callback function, but since I'd > like to call them from an other objects callback function - I'd need > them to be accessble directly. Unless somebody has an other solution? > > On Feb 28, 2:01 am, Alextronic <alejandro.garciacue...@gmail.com> > wrote: > > > Oh I'm having the same problem, exactly. > > > I have been working on this for a long time, me not being proficient > > in jQuery. > > I'm trying to do something very much like your tabs loading new sets > > of items. > > The carousel gets confused, the items seem to persist, and I can'treloadit > > without having the old number of items. > > Did you get to a solution? > > Thank you > > > Alex > > > On 13 feb, 09:19, FruitBatInShades <fruitbatinsha...@gmail.com> wrote: > > > > I am having terrible trouble gettingajcarouselto reset. I have a > > > series of tabs that when clicked get thejcarouselto load witha new > > > set of items. I have been trying for days, trying the ajax demos and > > > just replacing the content by setting the html() but to no avail. it > > > works but the carousel gets confused. Even if I walk the list and > > > remove all the items they still seem to be there. > > > > 1. How do I get a reference to the carousel object via jquery > > > 2. How do I get it clear itself and the dom of its items > > > 3. How do Ireloadit without it still having the old number of items > > > etc. > > > > Many thanks > > > > Lee