I'm VERY new to mobile apps and javascript and I'm using Titanium to edit a template.
I'm stuck on an img array code that will allow the preview image to be clicked and have the larger corresponding image appear. I can't seem to get the larger image to change in variable and if you think you can help me I'd greatly appreciate it!
Here is the link to show you what it looks like. I'd like the "lunch" image to go to the lunch menu, which is called images/menu/large/menu_shot1.png
2011-04-11_1302 - ViralTechnologies's library
Right now it only goes to the breakfast menu which is images/menu/large/menu_shot0.png
I'm also attaching the
js code. Thank you!!!
Present code:
var images = [];
for (var i = 0; i < 2; i++) {
images[i] = 'images/menu/menu_shotSmall' + i + '.png';
}
// create coverflow view with images
var view = Titanium.UI.createCoverFlowView({
images: images,
bottom: 0
});
win.add(view);
// click listener - when image is clicked
view.addEventListener('click',function(e) {
// the window to place the image in
var imgWindow = Ti.UI.createWindow({
modal: true,
barColor: '#050505',
backgroundColor: '#050505'
});
// The new image view to place the selected image
var fullImage = Ti.UI.createWebView({
html: '<img src="images/menu/large/menu_shot0.png" />'
});