-
-
Save hossinasaadi/e48d9faec1067056657579b7a78ef17e to your computer and use it in GitHub Desktop.
jQuery event that fires when the orientation (portrait, landscape) of a mobile device changes
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() { | |
alert(window.orientation); | |
//do whatever you want on orientation change here | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment