鼠标悬停的触摸事件

Touch event for mouseover

在网络应用触摸版中, 我正在将 鼠标事件 转换为 触摸事件 。 mousedown=>touchstart, 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 并阅读文档。

你应该试试 trigger('click') on('mouseover',function(){});

JQuery 移动设备的虚拟鼠标事件 做得很好。 https://api.jquerymobile.com/vmouseover/