有没有用于jQuery的移动触摸事件插件? [英] Is there a Mobile Touch Event Plugin for jQuery?

查看:151
本文介绍了有没有用于jQuery的移动触摸事件插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道jQuery Mobile随附了许多有用的移动设备事件。但是,我不想包含所有附加插件,作为整个jQuery Mobile软件包的一部分。



我的问题很简单:



有没有人遇到过一个可以添加触摸设备事件的独立jQuery的好插件?
这样的东西:

  $(this).tap(); 
$(this).taphold();
$(this).swipeleft();
$(this).swiperight();
$(this).doubletap();

我知道我可以自己写一个插件来实现这一点,但是我不想再 - 如果已经完成了... ...

解决方案

只是想指出,我最终写了我自己的图书馆这个:



https://github.com/benmajor/jQuery -Mobile-Events


I know that jQuery Mobile comes bundled with lots of useful events for mobile devices. However, I don't want to have to include all of the additional plugins that come as part of the entire jQuery Mobile package.

My question is simple:

Has anyone come across a good plugin for stand-alone jQuery that adds touch device events? Something like:

$(this).tap();
$(this).taphold();
$(this).swipeleft();
$(this).swiperight();
$(this).doubletap();

I know that I could write a plugin myself to achieve this, but I don't want to re-invent the wheel if it's already been done...

解决方案

Just wanted to point out that I eventually wrote my own library for this:

https://github.com/benmajor/jQuery-Mobile-Events

这篇关于有没有用于jQuery的移动触摸事件插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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