How to detect with javascript or jquery when user turns iPad from vertical position to horizontal or from horizontal to vertical?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
Try
In Javascript:
Or for including additional stylesheets:
Both taken from: http://favo.asia/2010/07/detecting-ipad-orientation-using-javascript/ which, FYI, was the first result on Google for 'detect ipad orientation javascript'...
You can detect the orientation change event using the following code:
jQuery:
Check if device is in portrait mode