javascript - 鼠标悬停的触摸事件

标签 javascript jquery events touch

在网络应用程序触摸版中, 我正在将鼠标事件转换为触摸事件。 鼠标按下=>触摸开始, mouseup=>touchend...

I also want to convert mouseover event.

Touch mouseover ? it is ansurd, the touchpad doesnt detect your finger in the air !

Not really, if you swipe your finger over an element, e.g. And you want the element to get bigger... for example.

是否有针对这种行为的触摸事件(鼠标悬停表示触摸)?

最佳答案

Currently, jQuery UI user interface library does not support the use of touch events in their widgets and interactions. This means that the slick UI you designed and tested in your desktop browser will fail on most, if not all, touch-enabled mobile devices, becuase jQuery UI listens to mouse events—mouseover, mousemove and mouseout—not touch events—touchstart, touchmove and touchend.

That's where jQuery UI Touch Punch comes in. Touch Punch works by using simulated events to map touch events to their mouse event analogs. Simply include the script on your page and your touch events will be turned into their corresponding mouse events to which jQuery UI will respond as expected.

访问website并阅读文档。

关于javascript - 鼠标悬停的触摸事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31044812/

相关文章:

javascript - 使用构造函数创建变量

javascript - 如何调整 iframe 的大小以适应 iframe 内容的高度?

jquery:使用 $.ajax 或 $.get 方法加载 html 元素

javascript - 触发选项卡索引开关时是否会触发 JavaScript 事件? (TABINDEX 不适用于 IFRAME 中的输入)

iphone - 在主页按钮上捕获关闭事件 UIImagePickerController

javascript - 我如何在气泡之间均匀分布?

javascript - jQuery 如果 url 哈希,单击事件/激活 javascript

javascript - Bootstrap Modal 关闭后 CSS Transition 中断

javascript - jquery detach 重新显示 div 内容时遇到问题

javascript - jQuery 的each、查找和追加