Cycle Single Image Alt Caption
I have a page where the user can pick from several albums. I display a slideshow and additional information by using the image.alt attribute. My code follows the cycle / caption demo as follows:
-
$(function() { |
|
$('#slideshow').cycle({ |
|
fx: 'fadeZoom', |
|
timeout: 2000, |
|
after: function() { |
|
$('#caption').html(this.alt); |
|
} |
|
}); |
|
}); |
|
</script> |
Everything works fine, unless the album has only one single image - then the "after" function doesn't fire. How can I force the "after" function to fire regardless of the number of images in the page? |
|
|