Created
April 11, 2011 14:19
-
-
Save VolkerK/913591 to your computer and use it in GitHub Desktop.
orientationchange sandbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
jQuery(window).bind("pageshow",function(e) { | |
printO(); | |
}); | |
jQuery(window).bind("orientationchange",function(e) { | |
printO(); | |
}); | |
function printO() { | |
var landscape = jQuery('html.landscape').size(); | |
var portrait = jQuery('html.portrait').size(); | |
alert('landscape=' + landscape); | |
alert('portrait=' + portrait); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment