copenndthagen
copenndthagen

Reputation: 50760

Website for iPad Mobile Safari

While creating a website for iPad Mobile Safari, I have a few questions;

  1. Does the orientation happen automatically or do we have to write code for that ?
  2. What is the best approach in terms of CSS/JS..I mean create separate copy of the web CSS for iPad and just update for iPad specific. Also what about JS?
  3. What is the best way to detect for iPad (CSS/JS) and how?

Any online references which specifically covers iPad Mobile Safari development will also be great. Thank you.

Upvotes: 0

Views: 572

Answers (2)

Antony Scott
Antony Scott

Reputation: 21996

I just added a few meta tags to my current project, based on this page - http://www.nczonline.net/blog/2010/04/06/ipad-web-development-tips/

It made a huge difference. The orientation media queries work great. I madea simple example by setting the body background colour different based on orientation.

Upvotes: 0

asinesio
asinesio

Reputation: 345

The orientation happens automatically, but you can write code to intercept the event and do things.

I highly recommend using an existing JS library such as Sencha Touch to handle the UI for you; they automatically detect the client and will display the appropriate scale of the app.

Upvotes: 1

Related Questions