Hide the address bar on mobile phones – jQuery

Ever needed to hide the address bar but didn’t want to use the excellent jQuery mobile. Well the following code doe just this.

This hides the address bar for a webpage on mobile devices. Works on iPhone, Android and Windows mobile phones:

addEventListener("load", function () {
 setTimeout(function () {
  window.scrollTo(0, 1);
  }, 0);
 });

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>