双击手机游猎 [英] Double tap on mobile safari

查看:144
本文介绍了双击手机游猎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法绑定到移动游猎的双击事件(在一行代码中)?或者,另一种方法是实施它拦截在一些短时间内发生的两次单击事件(例如:http://appcropolis.com/blog/implementing-doubletap-on-iphones-and-ipads/ )?

Is there a way to bind to a double-tap event (in a single line of code) for mobile safari? Or, the alternative is to implement it intercepting two single-tap events that happened in some short given time (example: http://appcropolis.com/blog/implementing-doubletap-on-iphones-and-ipads/)?

推荐答案

简答:您必须通过两次点击来实现。

Short answer: you must implement via two clicks.

实际答案:这是一个免费的jQuery实现双击移动safari只需要一行代码(启用dblclick事件):

Actual answer: Here is a jQuery-free implementation of double-tap for mobile safari which only requires one line of code (to enable dblclick event):

  • https://gist.github.com/2927073

此外,您可能需要使用此元标记禁用移动版Safari的默认缩放

<meta name="viewport" content="width=device-width,user-scalable=no" />

这篇关于双击手机游猎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆