-5

How to fix landscape mode HTML5 web app in Mobile( iphone / android ) using jQuery or JavaScript or any other way ??

Please suggest me.

Harish Patidar
  • 303
  • 4
  • 13

1 Answers1

0

You can use window.onorientationchange function for this

like,

function testLandscape()
{
   if($(window).height()<$(window).width())
   { 
       alert('landscape mode');
       return false;
   }  
}
window.onorientationchange=function(){
    testLandscape();//test on changing orientation
}
testLandscape();//test on page loads
Rohan Kumar
  • 40,431
  • 11
  • 76
  • 106
  • Yes.. I adjust screen height and width as per above code. But application will open in landscape mode automatically ? Or have to add any other ? – Harish Patidar Jul 10 '13 at 05:57