I have a little function which takes the content of a specified div,
fades it out, loads another image and fades it in. This function loops
evry 10 seconds or so.
the key function of the process is below.

function showImage(content)
{
var placeholder = $('JSplaceholder');
//setup tween
var tween = placeholder.get('tween', {property: 'opacity'});
//fade it away
tween.start(0).chain(function(){
        //get value from elsewhere and inject it in the dom
        placeholder.empty().set('html', content);;
        //show again
        tween.start(1);
});
setTimeout(changeImage, (seconds_between_photos * 1000));
}

JSplaceholder is the name if the div wher the content is replaced
content in some html containing an image passed from another function
(changeImage).

This all works perfectly. However, is is possible to, rather than
fading the existing content completly out and then fading the new
content in, do this simultaneously to make a nice smoth transition
between images?

I am sure it just needs a tweek of the above function, but I am not
too sure how to go about it?

I hope all this makes sense.

Any help would be most appreciated.

cheers

janus

Reply via email to