我有一些Jquery滚动条。Jquery - 检测手机浏览器的最佳方式? (mousedown/touchmove)
对于桌面浏览器我用这样的结构:
holder.bind('mousedown.rotate', function(e){
//some actions
doc.bind('mousemove.dragrotate', function(e){
//some actions
});
doc.bind('mouseup.dragrotate', function(){
//some actions
doc.unbind('.dragrotate');
});
});
为移动浏览器它的工作过程是这样:
holder.bind('touchmove', function(jQueryEvent) {
//some actions
});
什么是确定移动borwsers的最佳方式? 有没有办法在所有平台上使用相同的功能?
THX
http://stackoverflow.com/questions/3974827/detecting-touch-screen-devices-with-javascript的可能的复制 – 2012-07-05 18:01:18