jquery - How can I prompt user to rotate device if in a certain mode landscape or portrait, similar to GameInformer App -


i have website best viewed in landscape mode. how can have if user loads website in landscape mode fine if loads in portrait mode or rotate landscape portrait mode image or popups taking entire screen asking them rotate landscape? thinking javascript/jquery can this.

i have seen done on ipad game informer app if user opens app in portrait or rotates landscape portrait opaque image pops asking them rotate landscape. [see ipad screenshot] enter image description here

instead of jquery/js can use css styled div container instead, shown when device in portrait mode.

you can catch orientation media query

example:

/* screens */ #info {display: none;}  /* when orientation in portrait mode */ @media , (orientation:portrait) {     #info {          display: block;     } } 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -