0

i have a question regarding jQuery mousemove() on iPhone. The problem is that it doesn't show the movement on iPhone when touches occur; the events are not working properly in Safari on iPhone.

Can I get any tips of any Javascript plugins to fix this or detect movement on iPhone?

4

2 回答 2

2

您可以使用jQuery mobile并使用该插件创建的虚拟事件(vmousemove例如)。有关活动的更多信息,请点击此处

然而,这个框架并不兼容每个 jQuery 插件(例如,一些 jQuery-UI 小部件集成在其中,但方式不同)。它可能适用于非事件驱动的插件(即不会改变用户交互的方式)。

另一个选择是jQTouch,但我对此了解不多。

于 2011-09-01T11:10:35.253 回答
2

您应该使用该touchmove事件。使用示例:

$('#selector').bind('touchmove', function(event)
{
    // your code...
});
于 2012-02-24T22:15:59.803 回答