Chrome浏览器中的Touchstart问题

时间:2016-08-05 08:39:56

标签: javascript jquery html5 css3

我使用了按钮元素并且在触摸时按钮颜色发生了变化。我已经在jQuery中使用了touchstart / touchend事件。

现在问题出现在触摸设备的Chrome浏览器中,而长按触摸按钮会消失一段时间。

代码示例:

<script type='text/javascript'>
  $("#follow").live("touchstart", function() {
    $(this).addClass("active");
  }).live("touchend", function() {
    $(this).removeClass("active");
  });
</script>

0 个答案:

没有答案