I am using the following code to check the orientation of the iPad. This method is getting called only when i rotate the device or change the orientation of iPad. If a launched the app in landscape mode and when i navigate to this screen the below method is not getting called. How can i detect the orientation of the iPad without rotating the iPad.
$(window).bind('orientationchange', function (event) {
if (event.orientation == "landscape") {
set frame for landscape
} else {
set frame for portrait
}
});