简体   繁体   English

下拉菜单不适用于具有顶级链接的iPad

[英]Dropdown menu not working on iPad with top level links

So I have a client whose website uses cs-cart. 所以我有一个客户的网站使用cs-cart。 The top menu consist of a handful of dropdown menus, the top level item here is a link itself too. 顶层菜单由少数几个下拉菜单组成,顶层项目本身也是一个链接。

When I click on the top level item, the dropdown shows, however it clicks the link too and goes to that page, making it impossible to click on the items in the dropdown. 当我单击顶级项目时,将显示下拉列表,但是它也会单击链接并转到该页面,因此无法单击下拉列表中的项目。

(It seems to only happen for the first 5-6 top menu items too.. the last 3 seem ok?..) (这似乎也只出现在前5-6个顶级菜单项中。.后3个似乎还可以吗?。)

Further to this, when I do try and click on the dropdown menu items, it clicks on the banner behind it.. so still cant use it. 除此之外,当我尝试单击下拉菜单项时,它还单击了其后面的横幅..因此仍然无法使用它。

I've added modernizer and tried a couple of javascript fixes, but none seem to work. 我已经添加了现代化程序,并尝试了一些JavaScript修复程序,但似乎都无法正常工作。

Anyone know what else I can do? 有人知道我还能做什么吗?

Site: http://bit.ly/Mu5kbR 网站: http//bit.ly/Mu5kbR

Thanks, 谢谢,

Have you tried this? 你有尝试过吗?

if ( modernizr.touch ) {
    $('a.drop').click(function(e) {
       var next = $(this).next("div");
       if ( next.not(":visible") ) {
         e.preventDefault();
         next.show();
       }
    });
}

我的建议是将所有触摸设备的下拉动作从悬停更改为单击第一级

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

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