I do some User Agent sniffing so I know if it's specifically an
iPhone2
var iPhone2 = RegExp("OS 2_[^ ]* .*
AppleWebKit/").test(navigator.userAgent);
Ahrjay's method is much faster though if you know your page is being
served to an iPhone only.
On Aug 18, 4:12 am, Ahrjay <[EMAIL PROTECTED]> wrote:
> Just do a test with something you know 1.x doesn't support in
> javascript like
> if(document.ontouchstart)
> {
> 2.x stuff here
>
> } else {
> 1.x stuff here
> }
>
> On Aug 15, 12:17 am, shamus <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > How would you go about detecting 1.x versions of the iPhone OS vs. 2.x
> > versions of the os using JavaScript? Is it possible to see which
> > version of the OS a visitor has running?
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---