Skip to content

Instantly share code, notes, and snippets.

@rioleo
Created October 28, 2011 18:22
Show Gist options
  • Save rioleo/1322976 to your computer and use it in GitHub Desktop.
Save rioleo/1322976 to your computer and use it in GitHub Desktop.
Orientation
function updateOrientation() {
var contentType = "show_";
switch(window.orientation){
case 0:
contentType += "normal";
break;
case -90:
contentType += "right";
break;
case 90:
contentType += "left";
break;
case 180:
contentType += "flipped";
break;
}
$(".status").html(contentType);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment