Return to Snippet

Revision: 10595
at January 5, 2009 10:17 by luizlopes


Initial Code
<script type="text/javascript">  
 function orient()  
 {  
     switch(window.orientation){    
             case 0: document.getElementById("orient_css").href = "css/iphone_portrait.css";  
             break;  
   
             case -90: document.getElementById("orient_css").href = "css/iphone_landscape.css";  
             break;  
               
             case 90: document.getElementById("orient_css").href = "css/iphone_landscape.css";  
             break;  
   
 }  
   
 window.onload = orient();  
   
   
 </script>

Initial URL
http://nettuts.com/tutorials/tools-and-tips/learn-how-to-develop-for-the-iphone/

Initial Description

                                

Initial Title
iPhone Orientation Javascript

Initial Tags
javascript, iphone

Initial Language
JavaScript