title: update value based on orientation change on ipad
body: <p>What's the best way to update a value based on orientation change?</p>
  
  <p>Example mark-up value.</p>
  
  <pre><code>&lt;span class="week"&gt;Thursday&lt;/span&gt;
  </code></pre>
  
  <p>So if it was landscape, it would say <strong>Thursday</strong>, if it was in portrait it would say <strong>Thu</strong> instead.</p>
  
  <p>I can update the string using subString(0, 3), but I'm not sure how to change it back after.</p>
  
  <p>Heres the orientation change function I've got:</p>
  
  <pre><code>/* orientation change */
  function orient() {  
      if (window.orientation == 0 || window.orientation == 180) {
          $('body').attr('class', 'portrait');
          orientation = 'portrait';
          return false;
      }
      else if (window.orientation == 90 || window.orientation == -90) {
          $('body').attr('class', 'landscape');
          orientation = 'landscape';
          return false;
      }
  }
  /* all orientation function on page load */
  $(function(){
      orient();
  });
  /* call orientation function on orientation change */
  $(window).bind( 'orientationchange', function(e){
      orient();
  });
  </code></pre>