I'm doing a mobile site, and i need it to show screen as it always was in portrait orientation. Like Instagram app. works.
How could i do this with codes ?
if (window.orientation === 90 || window.orientation === -90) {
window.orientation=0;
}
I'm doing a mobile site, and i need it to show screen as it always was in portrait orientation. Like Instagram app. works.
How could i do this with codes ?
if (window.orientation === 90 || window.orientation === -90) {
window.orientation=0;
}
Not a good idea in general but you can find discussion here :
Blocking device rotation on mobile web pages
How do I lock the orientation to portrait mode in a iPhone Web Application?
a solution could be to rotate the content using CSS3 on orientation change event.