Recently started using S1. Developing a web app and trying to listen out for orientation change on iPad.
This works perfectly in full site mode on the iPad
function doOnOrientationChange() {
switch(window.orientation) {
case -90:
case 90:
alert('landscape');
break;
default:
alert('portrait');
break;
}
}
window.addEventListener('orientationchange', doOnOrientationChange);
// Initial execution if needed
doOnOrientationChange();
But only once on initial page load in the S1 app.
Anyone have any suggestions or advice?