Has anyone noticed this behavior? I\'m trying to write a script that will trigger upon a resize. It works fine on normal browsers, works fine on iPhone, but on iPad, will on
If I understood you correctly, you want to do something when the user tilts the iPad. Here you go:
window.onorientationchange = function(){
var orientation = window.orientation;
// Look at the value of window.orientation:
if (orientation === 0){
// iPad is in Portrait mode.
}
else if (orientation === 90){
// iPad is in Landscape mode. The screen is turned to the left.
}
else if (orientation === -90){
// iPad is in Landscape mode. The screen is turned to the right.
}
}