Add title to jQuery Cycle slideshow from Alt attribute?
Posted
by thatryan
on Stack Overflow
See other posts from Stack Overflow
or by thatryan
Published on 2010-03-25T08:39:50Z
Indexed on
2010/03/25
8:43 UTC
Read the original article
Hit count: 424
I am building a slideshow and need to have a title appear for each picture that get cycled. I created alt attributes for them and am trying to have cycle display them for each image, but It only shows the first one. I am unsure how to get the code I have into the cycle "loop" for the gallery? Does this make sense? here is what I have, (well, part of it I mean) :) thanks!
$('#slideshow').before('<div class="navigation">').cycle({
fx: 'fade',
timeout: 6000,
pager: '.navigation'
});
$('.image_title').html($(this).find('img').attr('alt'));
© Stack Overflow or respective owner