Apple has posted sample code demonstrating how to handle iPhone or iPod touch orientation events through JavaScript, HTML, and CSS. Whenever an iPhone rotates, it triggers orientation events that you can catch in Mobile Safari. Apple provides a sample iPhoneOrientation.js file that implements a typical




handler, window.onorientationchange. CSS attributes can dynamically change how the webpage appears.I loaded a copy of the sample by at my website. whether you’d like to give it a try on your iPhone, navigate here.

via http://www.tuaw.com/2007/12/20/iphone-orientation-apple-sample-code/

Original post by admin

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • description
  • ThisNext
  • MisterWong
  • Wists
Related Posts

  • AnySim Devs Release Source Code
  • New ‘AppsAmuck’ site open, includes real working code for iPhone developers

  • What's your opinion?