How do I lock the orientation to portrait mode in a iPhone Web Application?

This is a pretty hacky solution, but it’s at least something(?). The idea is to use a CSS transform to rotate the contents of your page to quasi-portrait mode. Here’s JavaScript (expressed in jQuery) code to get you started: $(document).ready(function () { function reorient(e) { var portrait = (window.orientation % 180 == 0); $(“body > … Read more

tech