I want to make my mobile web page auto scroll down to hide the browser search bar at the top of the page. An example of this is the Facebook home page on mobile, it auto scrolls down as soon as it loads so you almost feel like you're in an app and not a browser. Problem is each operating system has a different size for their browser search bar. Is there a property I can call to get its size or to autoscroll past it?
Asked
Active
Viewed 1,911 times
1
-
possible duplicate of [Removing address bar from browser (to view on Android)](http://stackoverflow.com/questions/4068559/removing-address-bar-from-browser-to-view-on-android) – Titouan de Bailleul Dec 09 '12 at 11:34
2 Answers
0
From Hide the Address Bar within Mobile Safari
window.addEventListener("load",function() {
// Set a timeout...
setTimeout(function(){
// Hide the address bar!
window.scrollTo(0, 1);
}, 0);
});
Hope this helps

Titouan de Bailleul
- 12,920
- 11
- 66
- 121
0
Here is the solution to make the auto scroll work in mobile browsers
$('#elemIdTOScroll')[0].scrollIntoView(true);

agold
- 6,140
- 9
- 38
- 54