How about :
if (window.orientation === undefined) {
//Not running on iPhone/iPod or version is less than 1.1.1, check
further.
} else {
//Running on iPod/iPhone v >= 1.1.1
}
--Jorge.
El 22/01/2008, a las 14:08, Thomas Tempelmann escribió:
>
>> the "right" way to do this is to use Object detection (this is what
>> Apple recommends as user agent strings may be spoofed and are not a
>> good way of deciding what content to show). For example, if you want
>> to check for if orientation is supported (1.1.1 and higher), you can
>> use the following code:
>>
>> if (window.orientation) { updateOrientation(); } else
>> { doOldSchoolUpdatingHere(); }
>
> Have you tried this yourself?
>
> When I tried on a iPod Touch 1.1.2, "window.orientation" returns
> true ONLY
> if the iPod is in landscape mode, but not when in portrait.
>
> So, I still have found no "proper" solution as to how to check for
> 1.1.1's
> "hasOrientationChanged" event support.
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---