function hideAddressBar(){ if(!window.location.hash) { if(document.height <= window.outerHeight + 10) { document.body.style.height = (window.outerHeight + 50) +'px'; setTimeout( function(){ window.scrollTo(0, 1); }, 50 ); } else { //setTimeout function is required by the iPhone to properly hide the address bar setTimeout( function(){ window.scrollTo(0, 1); }, 0 ); } } } window.addEventListener("load", hideAddressBar ); window.addEventListener("orientationchange", hideAddressBar );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)