Hide Mobile URL Bar On Load


/ Published in: jQuery

Hide the url bar on page load in webkit mobile browsers.


Copy this code and paste it in your HTML
  1. jQuery(window).load(function() {
  2. /mobile/i.test(navigator.userAgent) && document.documentElement.scrollTop === 0 && !pageYOffset && !location.hash && setTimeout(function () {
  3. window.scrollTo(0, 1);
  4. }, 1000);
  5. });

URL: http://remysharp.com/2010/08/05/doing-it-right-skipping-the-iphone-url-bar/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.