what kind of data structure accomplishes the code below? What is “data” and how do I add elements to “data” without explicitly stating the contents on instantiation(how would you do it in a for loop?)?
in my mind, “data” is an array of objects, but what is “image”? an instance variable?
// Galleria will use some custom image data:
var data = [{
image: 'myimg.jpg'
}, {
image: 'myimg2.jpg'
}];
$('#galleria').galleria({data_source: data});