Friday, December 14, 2012

Hidding the Address Bar in Mobile Browser


          All Mobile  web application need  address  bar hiding  option,  becuase basically  mobile  screens are very  small  in size  compared  to  the  Desktop.

      Use bellow to  code  to  hide the  address.  It  may help you  to  solve the  other  sort  of  challenges.

     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); }, 200 );
          setInterval("hideAddressBar()", 6000);
        }  
    }
  

Use  the  code  and call function hideAddressBar(); whenever you  required to  hide  the  address  bar.

hope,  It  may help  you. If you have  any  query  leave  me comments.


No comments:

Post a Comment