How do I go about calling a function within a jQuery array to add another array?
$('#map').zoommap({
// Width and Height of the Map
width: '490px',
height: '380px',
//Region
map: function getMaps();
});
getMaps() should return the following:
{
id: 'campus',
image: '/resources/images/maps/'+mapId,
data: '',
maps: []
}
Cheers,
Nick
Pretty sure
Will do the trick. No
;at the end (just a comma if you need to add more items), and you don’t need to putfunctionbefore it either, unless you’re trying to declare a function.If you’re questioning how to write the
getMaps()function, you pretty much have that too..Although I don’t know why you need the function at all, when you could just put the inner
{ id: ... }right in it’s place…. putting it all together: