Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide URL bar without hiding Smart App Banner on iOS

Is it possible to hide the address URL bar but not the Smart App Banner on iOS Safari?

I have tried the solutions from this question: Hiding address bar without hiding the smart app banner on iOS 6, but it doesn't seem to work. The Smart Banner still gets hidden when I use MBP.hideUrlBarOnLoad from https://github.com/h5bp/mobile-boilerplate/blob/master/js/helper.js, as the answer suggests to do.

like image 984
Zach Reed Avatar asked Nov 02 '22 16:11

Zach Reed


1 Answers

I use:

    $(document).ready(function () {
        mob.SetUpEvents();
        setTimeout(function () {
            if (jQuery("html.iphone").length > 0) {
                jQuery('html').css( "height", ( jQuery(window).height() + 60) + 'px');
                window.ScrollTo(0, 1);
            }
        }, 400);
    });

I hope this helps!

like image 75
jbartolome Avatar answered Nov 12 '22 12:11

jbartolome