Detect iOS Device Orientation with JavaScript

JavaScript gives us a way to determine the current orientation of iOS devices (iPhone, iPad, iPod). When the device is rotated a property of the window object is updated and an event dispatched.

Read Device Orientation
The window object in JavaScript on iOS devices has an orientation property that can be used to determine the rotation of the device. The following shows the values window.orientation for iOS devices (e.g. iPhone, iPad, iPod) at different orientations.  more...

No comments:

Post a Comment