Menu
Hi everyone ?
The follow array:
[CODE]
var data = {
‘1.jpg’: { caption: ‘Picture1.’ },
‘2.jpg’: { caption: ‘Picture2.’ },
‘3.jpg’: { caption: ‘Picture3.’ }
};
But i’d like to create that var dynamically.
Like that…
[CODE]
var numberElements = 3;
var i=0;
var data = new Array();
for(i=0; i<numberElements; i++)
data[i] = ‘1.jpg’: { caption: ‘Picture1.’ };
But this doesn’t work…
Any help?!?!
Thks