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
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
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
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',
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
5 matches
Mail list logo