HTML5 Drag Release offsetX offsetY jump

后端 未结 5 568
暖寄归人
暖寄归人 2021-01-02 07:19

I\'m playing with the HTML5 drag and drop and tracking the mouse position while dragging.

OffsetX and OffsetY works awesome until you release the mouse, the offsets

5条回答
  •  北海茫月
    2021-01-02 07:57

    You can add drag end event it should solve the problem.
    like this:

    $('#dragger').bind('dragend', function (e) {
         $('#console').html(e.originalEvent.offsetX);
    })
    

提交回复
热议问题