首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

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

2013-11-06 
求推荐 jquery支持触屏 事件 的插件求推荐 jquery支持触屏 事件 的插件如:触摸事件ontouchstartontouchmov

求推荐 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 ";
}
}

热点排行