I have implemented the code below to monitor the orientation of the iPad. However, it seems that this method is only triggered when I physically rotate the device or change its orientation. If the app is launched in landscape mode and I navigate to a different screen, the method does not execute. Is there a way to detect the iPad orientation without actually rotating the device?
$(window).bind('orientationchange', function (event) {
if (event.orientation == "landscape") {
set frame for landscape
} else {
set frame for portrait
}
});