window.orientation reports old value in onresize
I'm displaying a web page on an ipod touch that shows window.orie开发者_如何转开发ntation. It updates this text during the onresize event, and also during a timer. If I turn the ipod then the onresize event shows the old orientation, not the new orientation value. The timer always shows the correct value. Any idea what's wrong?
onorientationchange
is probably what you want to use.
精彩评论