Hey guys, I’m trying to hide the address bar on mobile devices by scrolling to the top of the page. This is like 2011 web beginner type stuff I know, but it’s actually not working even if I wrap it in a window.load.
Template.MasterLayout.created = function () {
$(function() {
function orientationChange(e) {
$("body").scrollTop(1);
}
var wH = $(window).outerHeight();
$("body").css({ height: "+=" + wH }).scrollTop(1);
$(window).bind("orientationchange", orientationChange);
});
};
What am I not getting here? This should be super simple, right? … Right?