我正在这样做,在桌子上效果很好:
$(document).on("click", function(){
$(".dropdown-toggle").removeClass("open");
});
但在 iPad 上它不起作用并且我的下拉菜单仍然打开
您应该使用touchstart
and touchend
触摸设备事件:
$(document).on("click touchend", function(){
$(".dropdown-toggle").removeClass("open");
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)