Created
May 31, 2010 00:53
-
-
Save defunkt/419433 to your computer and use it in GitHub Desktop.
Show or hide a sidebar in JS on iPad orientation change
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.onorientationchange = function() { | |
if (window.orientation == 0) { | |
$('#sidebar').fadeOut() | |
} else { | |
$('#sidebar').fadeIn() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment