jQuery slideshow - time lag between image changing and caption changing? beginner needs help
Hoping someone can help! Am new to jQuery and have built a slideshow with a caption using the following script. However there is an irritating lag between the time the image changes and the caption changes (ie image changes and then a a second later the caption changes. Can anyone advise how to fix this so that the image and caption change at the same time, with no lag? Thanks in advance!
<script type="text/javascript">
$(function() {
$('#slideshow').cycle({
fx: 'fade',
timeout: 3000,
after: function() {
$('#caption').html(this.alt);
}
});
});
</script>