Created
April 11, 2012 09:19
-
-
Save skwi/2358201 to your computer and use it in GitHub Desktop.
Detect Orientation Change in Javascript
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
window.addEventListener("orientationchange", function() { | |
// Announce the new orientation number | |
alert(window.orientation); | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment