Hide the Address Bar within Mobile Web Applications


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // When ready...
  2. window.addEventListener("load",function() {
  3. // Set a timeout...
  4. setTimeout(function(){
  5. // Hide the address bar!
  6. window.scrollTo(0, 1);
  7. }, 0);
  8. });
  9.  
  10.  
  11. Bonus: META Tag for Bookmarked Sites
  12.  
  13. <meta name="apple-mobile-web-app-capable" content="yes" />

URL: http://davidwalsh.name/hide-address-bar?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Bludice+%28David+Walsh+Blog+%3A%3A+PHP%2C+CSS%2C+MooTools%2C+and+Everything+Else%29&utm_content=Google+Reader

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.