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