html??™ > Tap here to go to
our < br/ > iPhone/iPod touch web site. < /a > < /h1 > ???;
}
}
< /script >
The init() function calls isAppleMobile() function to determine whether the user agent is an Apple
mobile device. If so, then HTML content is added to the placeholder div element. If not, then nothing is
added. The init() function is then called from the onload handler of the body . Figure 8 - 17 shows the
results when viewed from an iPhone or iPod touch.
Figure 8-17: Offering a freedom of choice to your users
Chapter 8: Enabling and Optimizing Web Sites for iPhone and iPod touch
200
Transform a Site to an iPhone/iPod touch Design
Once you decide to create a companion site specifically for Mobile Safari users, you have to decide
how existing content best fits inside of an iPhone and iPod touch UI design. You need to determine
whether you want to create your own custom design or model after the standard edge - to - edge navigation.
(See Chapters 2 and 3 for more on UI design.) The edge - to - edge design scheme works well for
many Web sites, as you ??™ ll see here.
As a case study, you ??™ ll turn once again to the Operation Classroom Web site, the homepage of which is
shown in Figure 8 - 18 . Several aspects of this site lend itself to using the edge - to - edge navigation UI.
Pages:
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231