Windows手机:jquery手机刷卡无法识别 [英] windows phone: jquery mobile swipe not recognized

查看:87
本文介绍了Windows手机:jquery手机刷卡无法识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作HTML + jquery移动应用程序。它可以在我的电脑上正常工作,但是当我在Windows手机上试用它时,滑动事件似乎不会被解雇。

  goToNextPage()
});


解决方案

Windows Phone 7 / IE9不支持mousemove事件jquery mobile无法识别滑动事件。

一些移动框架,如 Apache Cordova(PhoneGap)提供了解决方法为此,通过在本机(silverlight)触摸事件和Web浏览器控件之间添加特殊垫片来修复丢失的鼠标事件。 演示



更新



这在Windows Phone 8上运行良好,因为它支持mousemove。


I'm making an HTML + jquery mobile app. It works fine on my pc but when I try it out on my windows phone the swipe event doesn't seem to get fired..

$('div.ui-page').live("swipeleft", function () {
 goToNextPage()
});

解决方案

Windows Phone 7/IE9 does not support mousemove event so there is not way for jquery mobile to recognize swipe event.

Some mobile frameworks like Apache Cordova (PhoneGap) provide workaround for this by adding special shim between native (silverlight) touch events and web browser control to fix missing mouse events. Demo

Update

This works fine on Windows Phone 8 since it supports mousemove.

这篇关于Windows手机:jquery手机刷卡无法识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆