So there have been some posting going around that help you define styles using CSS3 Media Queries.
It's like you need a media query for standard tags or for JS you want to include. Something like a media query for the script tag would be awesome. Maybe you can detect if a style has been applied to an element in CSS? Here's a few resources I've looked at lately on the topic: * http://notes.jessedodds.com/post/730336221 * http://thomasmaier.me/2010/06/css-for-iphone-4-retina-display/ * http://blog.iwalt.com/2010/06/targeting-the-iphone-4-retina-display-with-css3-media-queries.html Hope this helps someone out there. -- Jordan Dobson Owner + Director MadeBySquad.com | Glue.Pro | SquadBlog.com (425) 444-8014 Follow me on twitter at http://Twitter.com/JordanDobson On Fri, Jun 25, 2010 at 11:40 AM, Stan Wiechers <[email protected]> wrote: > Hey Remi, > issue with the user-agent is that it doesn't tell you the model, only the OS > version. I wanted to know if a user has a 3G, 3GS or 4. > Best, > Stan > > On Fri, Jun 25, 2010 at 2:24 PM, Remi Grumeau <[email protected]> > wrote: >> >> Hey, >> >> Hi ! >> >> as usual you can't tell from the user-agent which iphone model you are >> dealing with. in the past i used a simple 20ms benchmark in javascript to >> distinguish between 2g/3g and 3gs. the idea was formed in a discussion in >> this very group here. >> var percentmobile_t=new Date().getTime(); >> var percentmobile_s=0; >> while(new Date().getTime()-percentmobile_t<20) >> { >> Math.random(); >> percentmobile_s++; >> } >> var model=(percentmobile_s>1000)?"3gs":"2g3g"; >> this worked well and i expected to be able to do something similar for the >> new device. didn't work. within the 20ms both create between 1500-2400 >> random numbers. i tried creating some other objects such as images or DOM >> nodes, but same thing, the browser performance is not distinguishable. does >> anyone of you have an idea what else to try? >> >> humm…. kind of a strange detection system but well, if it works, why not >> :) Why didn't you use user-agent or browser version? >> >> i was also trying to do it by detecting the new display resolution, but >> without luck. i always get 320x480 and never 640x960. is there any way to >> get to the 640x960 in javascript? >> >> screen.width ? >> >> disclosure: i am co-founder of percentmobile.com, a *free* mobile web >> analytics solution and we used the methods like the one above in the past to >> differentiate between models. >> >> Just sign-in :) >> R. >> >> -- >> 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. > > > > -- > "Local color. Soak it up" > Virginia Vidaura > > http://www.merkwelt.com/people/stan/ > > -- > 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. > -- 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.
