Filed under: Developer, iPhone
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 over at my website. If you'd like to give it a try on your iPhone, navigate here.
Thanks, syd
Read | Permalink | Email this | Commentssource
No comments:
Post a Comment