> > > Any way to have several slideshows on the same page, each with their > > > own independent navigation (prev/next), without giving them unique > > > ids? > > > > Couldn't get this working: > > > > $('.gallery').each(function() { > > > > var p = this.parentNode; > > > > $(this).cycle({ > > > fx: 'scrollHorz', > > > speed: 'slow', > > > timeout: 0, > > > next: $('a.next-image', p) > > > }); > > > > }); > > > That looks like it should work, assuming you have an anchor with a > > "next-image" class within the gallery parent. Can you post a link? > > My mistake -- the "next-image" link wasn't within the gallery parent. > > Could you explain how the next: $('a.next-image', p) part works -- is > the 'p' a second argument? I couldn't find this documented in the > cycle plugin docs.
$('a.next-image', p) The above is just a jQuery expression. You could have just as easily written your script like this: $('.gallery').each(function() { var next_link = $('a.next-image', this.parentNode); $(this).cycle({ fx: 'scrollHorz', speed: 'slow', timeout: 0, next: next_link }); });