20
8月
jquery 手机浏览器 click事件无效
默认情况下jquery的click是OK的,但是跟有些html5游戏代码一混起来就不行了。解决方案: $("#element").bind("mousedown touchstart", function(event){ event.stopPropagation(); event.preventDefault(); //do something }); 同时注册mousedown和touchstart事件。
默认情况下jquery的click是OK的,但是跟有些html5游戏代码一混起来就不行了。解决方案: $("#element").bind("mousedown touchstart", function(event){ event.stopPropagation(); event.preventDefault(); //do something }); 同时注册mousedown和touchstart事件。