Question

This is the link: Simple-fading-image-swap

I'm trying to achieve something similar to this, however, I'm needing to slower the change of photos down. Is there some way I can easily change the transition speed (time it spends fading)?

Was it helpful?

Solution

use it like this

$('.fadein img:gt(0)').hide();

setInterval(function () {
    $('.fadein :first-child').fadeOut(4000)
                             .next('img')
                             .fadeIn(10)
                             .end()
                             .appendTo('.fadein');
},4000 ); // 4 seconds

OTHER TIPS

try something like this,FIDDLE

setInterval(function () {
$('.fadein :first-child').fadeOut()
                         .next('img')
                         .fadeIn(3000)
                         .end()
                         .appendTo('.fadein');
}, 4000); // 4 seconds

You can specify time for fadeout

setInterval(function () {

        $('.fadein :first-child').fadeOut(2000)// 2 seconds
                                 .next('img')
                                 .fadeIn(2000)
                                 .end()
                                 .appendTo('.fadein');
    }, 4000); // 4 seconds
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top