Thanks Dave, I'll look into that and let you know if it worked. Regards,
Charles On Dec 18, 3:40 pm, ltlfrari <[email protected]> wrote: > Not sure if this will work but might be worth a try. > > From what I understand you need to execute the setupZoom function > 'each' time you get a new page from the back end. > > First off, you need to include the fancyZoom javascripts in the head > of the initial page you send to the device, ie the same place as you > specify the iui scripts etc. > If you have images in the initial page you want to zoom enable, call > the setupZoom function after the inital page loads. This only works > for the initial page load because after that iUI is obtaining the data > via Ajax and inserting the results into the DOM itself so any > javascript never gets execute. > > What you need to do (I think) is capture the new page load event and > invoke the setupZoom function again. I don't know if executing > setupzoom multiple time will cause any problems though, something to > experiment with. > > What I have done is to add this code as a script to my main page head > section so that it executes when the page loads, it sets up an event > listenr to capture the 'aftertransition' (iUI 0.40) event and use that > to execute some javascript (like this in your case): > > addEventListener("aftertransition", function(event) > { > if (event.out == false) { > > setupZoom(); > > } > > } > > Each time you go to a new page (external from a server OR internal > bookmarked page) it will run the setupZoom function after the new page > is displayed. you could change the vent.out == false to vent.out == > true to do that on the old page out event instead. > > Like I say, I have no idea if executing setupZoom multiple times is a > bad thing or not. > > Hope that helps > > Dave E -- You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
