Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created May 31, 2010 00:53
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save defunkt/419433 to your computer and use it in GitHub Desktop.
Save defunkt/419433 to your computer and use it in GitHub Desktop.
Show or hide a sidebar in JS on iPad orientation change
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