Mike, I tried using the onBefore, and I looked at the samples at your website (http://malsup.com/jquery/cycle/int2.html), but for some reason, the function doesn't recognize the image title or alt text. I get the "this.src" or "this.alt" as undefined. And that's the reason I turned to the prevNextClick. With this function, I could send the html object to the function. At first I thought it's because I am loading the images in a wordpress loop, but with firebug I could see that the page has all the information. So I am unsure what I am doing wrong?
Thanks, Mor On Dec 11, 6:40 pm, Mike Alsup <mal...@gmail.com> wrote: > > $(function() { > > $('#s1').cycle({ > > fx: 'scrollHorz', > > speed: 'fast', > > timeout: 0, > > prevNextClick: onBefore, > > next: '#next2', > > prev: '#prev2' > > }); > > Don't use the prevNextClick option, that callback is only invoked when > the prev or next item is clicked. Use the 'before' option instead. > > $(function() { > $('#s1').cycle({ > fx: 'scrollHorz', > speed: 'fast', > timeout: 0, > before: onBefore, > next: '#next2', > prev: '#prev2' > > }); > > Mike