Revision: 36993
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 2, 2010 08:40 by peterbelsky
Initial Code
detectOrientation(); window.onorientationchange = detectOrientation; function detectOrientation(){ if(typeof window.onorientationchange != 'undefined'){ if ( orientation == 0 ) { //Do Something In Portrait Mode } else if ( orientation == 90 ) { //Do Something In Landscape Mode } else if ( orientation == -90 ) { //Do Something In Landscape Mode } else if ( orientation == 180 ) { //Do Something In Landscape Mode } } }
Initial URL
http://www.devinrolsen.com/javascript-mobile-orientation-detection/
Initial Description
Initial Title
Javascript Mobile Orientation Detection
Initial Tags
Initial Language
JavaScript