jquery-touch轻量级touch事件库
基于jQuery的轻量级touch事件库
demo: photo-slide
支持移动端和pc端
touchstart
touchmove
touchend
使用方法
$.touch.bind($('.td'), {
start: function(e) {
//console.log('start', e);
},
move: function(e) {
//console.log('move', e);
},
end: function(e) {
console.log('end', e);
},
swipe: function(e) {
if(e.direction == 'left') {
console.log('swipte left', e);
} else if(e.direction == 'right') {
console.log('swipte right', e);
}
}
});更多请看demo示例
评论
