1
我正面臨一個問題,試圖找到一種方法來製作一段基於代碼的鼠標事件。它可以很好地與鼠標配合使用,但會與觸摸設備發生奇怪的反應。從touchmove中檢索回覆的元素
我要趕一個鼠標按下或touchstart,這裏沒有問題,它在另一個返回元素
$('body').on("mousedown touchstart", 'ul#squares li p', function(e){
console(this.id);
});
但是當我試圖抓住這個事實手指移動的ID(不往上走)元素,它仍然返回由touchstart事件有關元素的id,彷彿手指仍然在它
$('body').on("mouseover touchmove", 'ul#squares li p', function(e){
console(this.id);
});
https://jsfiddle.net/um3fr0wg/1/
任何想法?