i have code
function smena(){
$('.wrapper').animate({opacity:0},2500,function(){
setTimeout ($('.wrapper').animate({opacity:1},2500),5000)
});
}
$(document).ready(function(){
setInterval('smena();',10000);
});
why me animaation jump? i want just change bg for my div “wrapper”.
Basically you’re not passing the functions around correctly for setTimeout. You’re actually passing the result of “$(‘.wrapper’).animate({opacity:1},2500)” to the setTimeout, not the action itself. This is probably what you want: