title: How do I detect when the iPhone goes into landscape mode via JavaScript? Is there an event for this?
body: <p>I’m writing a web site targeted at the iPhone. I’d like to set a class on the <code>&lt;body&gt;</code> element when the iPhone’s orientation changes (i.e. when the user turns the phone into landscape and/or portrait mode).</p>
  
  <p>Can I detect this change via JavaScript? Is there an event for this?</p>