You could do something like this: $('div.containerClass').each(function() { var p = this.parentNode; $(this).cycle({ fx: 'scrollHorz', speed: 'slow', timeout: 0, next: $('a.next', p), prev: $('a.prev', p) }); });
Mike On 9/6/07, rolfsf <[EMAIL PROTECTED]> wrote: > > > Playing with the wonderful Cycle plugin. Rather than using container ID's and > having specific options for each, I want to use the same settings for > multiple containers of the same class. In other words, rather than: > > $('div#containerName').cycle({ > fx: 'scrollHorz', > speed: 'slow', > timeout: 0, > next: 'a#next', > prev: 'a#prev' > }); > > I want something like: > > $('div.containerClass').cycle({ > fx: 'scrollHorz', > speed: 'slow', > timeout: 0, > next: 'a.next', > prev: 'a.prev' > }); > > The problem, obviously, is that this will cause all containers on the page > to advance simultaneously. How do I limit the click events to their parent > in this case? > > thanks! > -- > View this message in context: > http://www.nabble.com/Cycle-plugin---set-up-multiple-containers-with-same-options-tf4394687s15494.html#a12531488 > Sent from the JQuery mailing list archive at Nabble.com. > >