当前位置: 代码迷 >> JavaScript >> 求推荐 jquery 支持触屏 事件 的插件解决方案
  详细解决方案

求推荐 jquery 支持触屏 事件 的插件解决方案

热度:116   发布时间:2013-11-06 16:26:37.0
求推荐 jquery 支持触屏 事件 的插件
求推荐 jquery  支持触屏 事件 的插件
如:
触摸事件
ontouchstart
ontouchmove
ontouchend
ontouchcancel 

------解决方案--------------------
jquery mobile
------解决方案--------------------
楼主你可以这样

//适应触控设备
function eventAdapt(){
mousedown = "mousedown ";
mousemove = "mousemove ";
mouseup = "mouseup ";
mouseout= "mouseout ";
if ('ontouchstart' in window) {
mousedown = "touchstart ";
mousemove = "touchmove ";
mouseup = "touchend ";
mouseout= "touchcancel ";
}
}
  相关解决方案