I am using this:
//if in landscape mode
while(window.orientation == 90 || window.orientation == -90) {
if(!$('#page' + hiddenNextPage).hasClass('showUp')) {
$('#page' + hiddenNextPage).addClass('showUp');
$('#page' + hiddenNextPage).css('margin-left', '300px');
};
}
//if in portrait mode
while(window.orientation == 0) {
if($('#page' + hiddenNextPage).hasClass('showUp')) {
$('#page' + hiddenNextPage).removeClass('showUp');
$('#page' + hiddenNextPage).css('margin-left', '5px');
};
};
But its making my pages not even load anymore.. & it takes such a long time to load this. Is there anything wrong with it?
Is there a better way of constantly checking if the orientation has been changed without using a while loop?
This is for the ipad/iphone
Thanks!