It’s simple, just take a look at the browser identification:
It basically searches in the browser information for any occurence of “iPad” and returns true if found.
Here’s an example of Safari’s identification on the iPad:
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/4.0.5 Mobile/7B367 Safari/6531.22.7
So, what are you going to do with this? It’s obvious: Style your website or re-order your content to match exactly your iPad’s orientation ;-)
Here’s an example on how to detect the current orientation of the iPad device either by pressing a button or when the orientation changes, using an event called onOrientationChange:
You can also use CSS Stylesheets using the media definition:
The detection is not restricted to the iPad, it should work on all iOS devices.