$('#OneMars').fadeOut(1000, function() { $(this).css('background-image','url("http://localhost/bestwindows/images/pictures/1_prav.jpg")').fadeIn(1000); });