mmenu hide address bar when expanded on mobile

坚强是说给别人听的谎言 提交于 2019-12-24 09:42:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!