Scroll mobile browser window to hide location bar


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. window.addEventListener('load', function(){
  2. if (location.hash.length == 0) {
  3. setTimeout(scrollTo, 0, 0, 1);
  4. }
  5. }, false);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.