Although the title is almost the same, my question is not a duplicate of Prevent orientation change in iOS Safari (I changed the answer to make the code below)
I wrote the code below so if the user rotate the iPad/iPhone/iPod, I rotate the content so he will be obliged to rotate the device to see normally the content.
if(window.orientation==90)
{
document.getElementById("orient").style.webkitTransform="rotate("+window.orientation+"deg)";
document.getElementById("orient").style.webkitTransformOrigin="0px 0px";
document.getElementById("orient").style.top=screen.height+"px";
}
When I rotate my device, the content disappear. Can someone help me to make this work?