悠悠楠杉
网站页面
                
             
                                            
                $(".text").on({
    touchstart: function(e) {
        var oSpan = e.currentTarget.lastElementChild
            // 长按事件触发
        timeOutEvent = setTimeout(function() {
            timeOutEvent = 0;
            console.log('你长按了');
        }, 500);
    },
    touchmove: function() {
        clearTimeout(timeOutEvent);
        timeOutEvent = 0;
    },
    touchend: function() {
        clearTimeout(timeOutEvent);
        if (timeOutEvent != 0) {
            console.log('你点击了');
        }
        return false;
    }
})
 
                                 
                                 
                                 
                                