> $('.slideshow ul').each(function() { > var $this = $(this); > $this.cycle({ > // ... > prev: $(this).prev('p').find('a.prev'); > next: $(this).prev('p').find('a.next'); > }); > > });
Bah, too many parens. $('.slideshow ul').each(function() { var $this = $(this); $this.cycle({ // ... prev: $this.prev('p').find('a.prev'); next: $this.prev('p').find('a.next'); }); }); Untested but you get the idea.