html5 - How to reload the webpage when orientation changes? -
i'm trying trigger event jquery mobile automatically reloads page when device's orientation changes. have media queries written max-device-width,
orientation:landscape,
, orientation: portrait
. since <video>
wont scale properly...the solution can think of refresh page correct media query device rotated.
how go doing this? thanks.
thanks guys answered found , used , worked perfectly.
<script type="text/javascript"> // reloads webpage when mobile orientation changes window.onorientationchange = function() { var orientation = window.orientation; switch(orientation) { case 0: case 90: case -90: window.location.reload(); break; } };
Comments
Post a Comment