Posted By

tmmyy on 03/16/11


Tagged

javascript iphone


Versions (?)

Hide iPhone address bar on load


 / Published in: JavaScript
 

  1. <script type="application/x-javascript">
  2. if (navigator.userAgent.indexOf('iPhone') != -1) {
  3. addEventListener("load", function() {
  4. setTimeout(hideURLbar, 0);
  5. }, false);
  6. }
  7.  
  8. function hideURLbar() {
  9. window.scrollTo(0, 1);
  10. }
  11. </script>

Report this snippet  

You need to login to post a comment.