[jQuery] Re: jQuery Cycle Plugin and Captions - Please help!

2009-11-22 Thread Mike Alsup
Try this: after: function(curr, next, opts) { var alt = $(next).find('img').attr('alt'); $('#caption').html(alt); } On Nov 22, 12:12 am, Wroathe wrote: > You're on the right track!!! I added an alt attribute to the > first .featured-image and it displayed exactly where I wanted it!!! > T

[jQuery] Re: jQuery Cycle Plugin and Captions - Please help!

2009-11-21 Thread Wroathe
You're on the right track!!! I added an alt attribute to the first .featured-image and it displayed exactly where I wanted it!!! The question is now how to select the img tag nested in it (in the interest of writing valid xhtml). On Nov 21, 11:06 pm, Wroathe wrote: > I tried it and it didn't work

[jQuery] Re: jQuery Cycle Plugin and Captions - Please help!

2009-11-21 Thread Wroathe
I tried it and it didn't work Mike. I did a console.log of the alt variable afterwards and it was tossing undefined. I think this is because I have all of the slides wrapped in divs. I'm not sure how to remedy that problem. Is there a way of selecting the img's alt attribute using the code you just

[jQuery] Re: jQuery Cycle Plugin and Captions - Please help!

2009-11-21 Thread Wroathe
I'll give that try and see how it works - thanks in advance for the reply. I really appreciate it. On Nov 21, 7:01 pm, Mike Alsup wrote: > Try using the 'after' callback: > > $(function() { >     $('div#slides').cycle({ >         timeout: 7000, >         pause: 1, >         pager: 'div#buttons',

[jQuery] Re: jQuery Cycle Plugin and Captions - Please help!

2009-11-21 Thread Mike Alsup
Try using the 'after' callback: $(function() { $('div#slides').cycle({ timeout: 7000, pause: 1, pager: 'div#buttons', pagerAnchorBuilder: function(idx) { return '' + idx + ''; }, after: function(curr, next, opts) { var alt