I'm using the plugin backstretch for my site. If I want to use this in static mode I can do in this mode:
$.backstretch([
"http://dl.dropbox.com/u/515046/www/outside.jpg"
, "http://dl.dropbox.com/u/515046/www/garfield-interior.jpg"
, "http://dl.dropbox.com/u/515046/www/cheers.jpg"]
, {duration: 3000, fade: 750});
But if I want to do this in dynamic mode i have thinked to pass an array to teh backstretch like this:
var arr2 = "[\"img/home/1.jpg\", \"img/home/2.jpg\"]";
$.backstretch(
arr2, {duration: 3000, fade: 750});
I have also tried:
var arr = new Array();
for (var i=1; i<3; i++){
arr.push("img/home/"+i+".jpg");
}
But this doesn't work.. why?