// jQuery的长按事件
$(".detail").on('touchstart', 'img', function(event) {
var _that = $(this);
timeOutEvent = setTimeout(function() {
// 长按事件
timeOutEvent = 0;
console.log(_that.attr('src'));
}, 400);
});$(".detail").on('touchmove', 'img', function(event) {
clearTimeout(timeOutEvent);
timeOutEvent = 0;
});$(".detail").on('touchend', 'img', function(event) {
clearTimeout(timeOutEvent);
if (timeOutEvent != 0) {
// 点击事件
}
});