I have a series of images that cycle through a slideshow as css background properties. The code below should also have them fade in and out via jQuery's fadeIn property, but for some reason it does not fade, and simply changes instead. Any ideas?
This is a follow up from a comment that was never solved. Fiddle here: http://jsfiddle.net/5fVZ7/6/
var images=new Array();
images[0]='http://s29.postimg.org/912bsm0mf/dataarancio.jpg';
images[1]='http://s27.postimg.org/y6tl17eb7/velocita.jpg';
var nextimage=0;
doSlideshow();
function doSlideshow(){
if(nextimage>=images.length){nextimage=0;}
$('.bkg')
.css('background-image','url("'+images[nextimage++]+'")')
.fadeIn(500,function(){
setTimeout(doSlideshow,4000);
});
}