Imposible to change div's background image
Hello!
I'm trying to change the background of a div with an Interval, for this mission I have set up an array with images:
-
var thepic = 0;
var ary = new Array();
ary[0] = new Image();
ary[0].src = "url(images/tyrtr.jpg)";
ary[1] = new Image();
ary[1].src = "url(images/ryyry.jpg)";
function doChange()
{
thepic = (thepic + 1) %2;
$('#content').css({"background-image":""+ary[thepic]+""});
}
All the time the FF debugger is telling that the css background image property have not been accepted...
I guess is justa syntax error, but where?
Thanks for your help.