0

I am building a site (html5 games, videos and the like) which really won't work in portrait view on tablets.

I'd like to be able to lock the screen so that when a user rotates their device the page remains in in landscape.

Is there anything similar to preventDefault that I could use?

Something like:

$(window).on('orientationchange', function(e){
    e.preventDefault();
});

I've been goolging/stacking around but have been unable to find anything to fulfil my requirements.

Any ideas, suggestions greatly appreciated.

Thanks Dave

magicspon
  • 896
  • 2
  • 9
  • 28
  • you can write a function and update the windowsorientation to landscape on changed see http://stackoverflow.com/questions/2313194/can-i-trigger-a-css-event-in-mobile-safari-upon-iphone-orientation-change –  May 17 '13 at 16:11
  • thanks, i'll take a look – magicspon May 17 '13 at 16:25

0 Answers0