[英]jquery mobile events on android vs. iphone
我是jquery mobile的新手。 我的问题是我需要捕获div上的vmousemove事件,因为我需要像在谷歌地图上的svg图像一样拖动这个div中的图像。
我在http://demo.baral.de/test/上有一个演示
我有3个设备: iphone iOS5 , 三星选项卡上的Android 3.2和HTC欲望的Android 2.2.2 。 当我“盘旋”在绿色div上时,我认为当我的手指触摸显示屏上的移动时会有很多“vmousemove”。
iphone开火了:
这似乎对我来说是完美的
Android 3.2开火:
Android 2.2.2触发:
在我完成移动并且我的手指离开显示器后它会发射
这对于jquery mobile来说是“正常的”吗? 一个错误或只是错误的代码?
谢谢!
编码:
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
</head>
<body>
<div data-role="page" data-position="fixed" id="wrapper">
<div id="test" style="width: 200px; height: 200px; background-color: green"></div>
<div id="footer" style="border: 1px solid black; width: 200px;">
<ul></ul>
</div>
</div>
<script type="text/javascript">
$("#wrapper").live('pageinit', function() {
$("#test").bind('vmouseover vmousedown vmousemove vmouseup vclick vmousecancel', function (event) {
$('#footer ul').append("<li>"+event.type+"</li>");
});
});
</script>
</body>
这不是jquery-mobile的错误,当你想要在鼠标移动时实现某些东西时,无论如何你都可以这样做,因为它会被触发一次。 它可能是设计上的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.