Ah, I don't think I made myself very clear :P What I'm looking for is to have this:
<div class="jcarousel-control"> <a href="#" class="current">1</a> <a href="#">2</a> <a href="#">3</a> <a href="#">4</a> </div> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> </ul> When 'Item 1' in the main <ul> becomes visible. Hope that made more sense! Many thanks, Alex On Sat, Nov 29, 2008 at 11:22 PM, brian <[EMAIL PROTECTED]> wrote: > Something along these lines, perhaps: > > $(document).ready(function() > { > $('#gallery').jcarousel({ > scroll: 1, > visible: 1, > itemVisibleInCallback: itemVisibleIn > }); > }); > > function itemVisibleIn(carousel, li, index, state) > { > $(li).contents('a').addClass('Current'); > } > > You can also specify an itemVisibleOutCallback to remove the class once > it's > no longer visible. > > > > On Sat, Nov 29, 2008 at 5:22 PM, Alex Hempton-Smith < > [EMAIL PROTECTED]> wrote: > >> Thanks Brian, >> I've read through that documentation and I'm not sure how I would go about >> using that to add the 'current' class to the <a> tag? >> Would you be able to post some code? I'm still a jQuery n00b! >> >> -- Alex >> >> >> On Sat, Nov 29, 2008 at 5:40 PM, brian <[EMAIL PROTECTED]> wrote: >> >>> Create an itemVisibleInCallback function. The second param is the >>> list-item object, from which you can get the anchor. >>> >>> http://sorgalla.com/projects/jcarousel/#Configuration >>> >>> >>> On Sat, Nov 29, 2008 at 10:38 AM, Alex <[EMAIL PROTECTED]>wrote: >>> >>>> >>>> Using the example of external controls (http://sorgalla.com/projects/ >>>> jcarousel/examples/static_controls.html<http://sorgalla.com/projects/jcarousel/examples/static_controls.html> >>>> ). >>>> >>>> When a certain item is visible, how do I add a class such as 'current' >>>> to the <a href="#"> for that item? >>>> >>>> Many thanks, >>>> Alex >>> >>> >>> >> >