I want to kind of continue some other Question:
How does jquery mobile hide mobile safari's addressbar?
this hides the adressbar after page is loaded.
SOLUTION
i thought about the scroll position and ended up with this:
var touchHeight = $('.mobile-touch-overflow').height(),
screenHeight = utils.getScreenHeight() - (utils.notStandalone()?44:0);
// touchOverflow: hide adressbar when scrolling
if(touchHeight > screenHeight && utils.supportTouchOverflow())
{
$('.mobile-touch-overflow').bind('touchmove',function(){
if($('.page-content').offset().top < 0)
{
utils.windowScroll(1);
}
return true;
});
}
and here the test file:
title
Header
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###
###