How do I detect when the iPhone goes into landscape mode via JavaScript? Is there an event for this?
Yup, via the onorientationchange
event and the window.orientation
property.
- Documented by Apple
- Example code on Ajaxian
Yup, via the onorientationchange
event and the window.orientation
property.