Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我为PhoneGap使用了一个iOS插件,当我直接打电话给他时我的插件工作正常,问题是当我在点击事件中调用我的插件时
callNativePlugin('success');//Working fine $(".Button").on('touchstart',function(){ callNativePlugin('success');//Not working });
您确定“.Button”选择器与页面中的 HTML 元素匹配吗?
即这行得通吗?
$(".Button").on('touchstart',function(){ alert("touchstart worked"); callNativePlugin('success');//Not working?? });
是的,实际上问题是一个简单的 javascript 冲突,它阻止了事件点击的执行。谢谢