I am building a website with scrollify (forced scroll points) and am in the process of removing landscape orientation from mobile devices (displays only a warning while in landscape) and then returns to normal view and functionality when returning to portrait orientation.
The change in orientation forces a zoom to happen that I cannot seem to be able to resolve by any java forced page reload functionality or delay. The page reprints correctly if I retype the link, but a refresh will not make it happen. Also replacing the link as displayed in my code below does not force the page to re-print to the orientation either.
<script type="text/javascript">
window.onorientationchange = function() {
var orientation = window.orientation;
switch(orientation) {
case 0:
case 90:
case -90: setTimeout(()=>{
window.location.replace("http://www.nebkodo.com/NEBKODO_PRELAUNCH.html")
},2000)
}
};
</script>
I have also attempted using the meta content="width=device-width"
Example site at http://nebkodo.com/NEBKODO_PRELAUNCH.html
Thank you for any help!
Aucun commentaire:
Enregistrer un commentaire