简体   繁体   English

Javascript在移动设备上不起作用

[英]Javascript doesn't work on mobile

I have a small problem with javascript on mobile. 我在移动设备上遇到了一个小问题。 Website which I work on is this , and the problem is at the menu for mobiles. 我正在研究的网站是这个 ,问题出在手机菜单上。 On desktop works like charm, but on mobile doesn't open the menu. 在台式机上的工作原理很像魅惑,但在移动设备上则无法打开菜单。 I think the problem is JavaScript that doesn't work well. 我认为问题是JavaScript无法正常运行。 I don't get any warning in console. 我在控制台中没有收到任何警告。

document.getElementById("trigger-meniu-mobil").onclick = function(){
 document.getElementById("meniu-mobil").style.display="block";
};
document.getElementById("menu-close").onclick = function(){
 document.getElementById("meniu-mobil").style.display="none";
};

You are loading a JavaScript file that does not exist on the server. 您正在加载服务器上不存在的JavaScript文件。 Forget to upload maybe? 忘记上传了吗?

<script type="text/javascript" src="/wp-content/themes/attitude/library/js/meniu.js"></script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM