I need help, I would like to change the title in a div when rotating the image.
$('.pics').cycle({
fx: 'fade',
timeout: 6000,
after: function() {
var title = $('.image').attr('alt');
$('.image_title').html(title);
}
});
....
<div class="pics">
<img src="01.jpg" alt="Picture 1" class="image"/>
<img src="02.jpg" alt="Picture 2" class="image"/>
<img src="03.jpg" alt="Picture 3" class="image"/>
</div>
<div class="image_title"></div>
but this does not work, it displays only the first attribute