Hide address bar

function hideAddressBar() { if(!window.location.hash) { if(document.height < window.outerHeight) { document.body.style.height = (window.outerHeight + 50) + 'px'; } setTimeout( function(){ window.scrollTo(0, 1); }, 50 ); } } window.addEventListener("load", function(){ if(!window.pageYOffset){ hideAddressBar(); } } ); window.addEventListener("orientationchange", hideAddressBar ); /*-------------------------*/ http://mobile.tutsplus.com/tutorials/mobile-web-apps/remove-address-bar/

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.