开发者

jQuery mousemove() In Iphone

开发者 https://www.devze.com 2023-04-01 15:22 出处:网络
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.

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开发者_如何学C get any tips of any Javascript plugins to fix this or detect movement on iPhone?


You can use jQuery mobile and use the virtual events created by that plugin (vmousemove for example). More info on the events here.

However this framework is NOT compatible with every jQuery plug-in (for example some of jQuery-UI widgets are integrated in it, but in a different way). It probably works for plugin that are not event driven (i.e. that don't change the way the user interract).

An other choice is jQTouch but I don't know much about it.


You should use the touchmove event. Example of usage:

$('#selector').bind('touchmove', function(event)
{
    // your code...
});
0

精彩评论

暂无评论...
验证码 换一张
取 消