Skip to content

Instantly share code, notes, and snippets.

@victornpb
Created December 1, 2013 17:04
Show Gist options
  • Save victornpb/7736786 to your computer and use it in GitHub Desktop.
Save victornpb/7736786 to your computer and use it in GitHub Desktop.
Hide the address bar on mobile devices.
/** Hide the address bar - vitim.us */
function hideAddressBar(){
setTimeout(function(){
if(scrollY) return;
scrollTo(scrollX, 1);
setTimeout(function()
if(scrollY==1)
scrollTo(scrollX, 0);
}, 1);
}, 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment