3
我使用这个非常棒的代码来模拟Android http://pervasivecode.blogspot.co.nz/2011/11/android-phonegap-active-css-pseudo.html上的触摸事件。工程很好,但太敏感。例如,如果你有一个列表,并且当你触摸列表上的任何东西,它就会突出显示一个链接。touchstart太敏感了
$(document).ready(function(){
if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
$('a')
.bind("touchstart", function() {
$(this).addClass("fake-active");
})
.bind("touchend", function() {
$(this).removeClass("fake-active");
});
}
});
是否有可能延迟班级更改或是否存在可以使用的另一个触发器?