问题
I am using mmenu (http://mmenu.frebsite.nl/) jQuery plugin for a mobile page and I am trying to keep the address bar on the iPhone hidden at all times. I currently have:
window.addEventListener("load",function() {
// Set a timeout...
setTimeout(function(){
// Hide the address bar!
window.scrollTo(0, 1);
}, 0);
});
but this only hide on page load so when I click the left menu and right menu buttons and the menus expand out the address bar reappears. Was wondering if there was a way to keep the address bar hidden when the menus are in their expanded state.
回答1:
Issue should be fixed in the latest version of the plugin: http://mmenu.frebsite.nl/download.php#changelog_3_2
回答2:
This seemed to fix my issue.
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, height=device-height, width=device-width, user-scalable = no">
来源:https://stackoverflow.com/questions/18279064/mmenu-hide-address-bar-when-expanded-on-mobile