Probably easy question, I've just never done this before... I'm trying to figure out how you would populate a jQuery plugin property object/array or whatever you call it... with a normal array.
var imageArray = new Array();
imageArray = ['images/1000x800.png','images/495x880.png','images/600x800.png'];
So, I trying to get that into... the plugin property "image" with an unknown amount of images...
jQuery(function($){
$.myPlugin({
slides : [
{image : 'images/1000x800.png'},
{image : 'images/495x880.png'},
{image : 'images/600x800.png'},
//...etc...
]
});
});
Here's an example of what I'm trying to do... although I don't know the correct syntax...
jQuery(function($){
$.myPlugin({
slides : [ for(var i=0; i<imageArray.length; i++) {
image = imageArray[i];
}
]
});
});
Any help appreciated!!!