我将“#draggable”元素拖到“.droptarget”
如何获得相对于droppable元素的鼠标/可拖动事件的实时位置?
droppable中的“over”方法不会更新鼠标位置(如悬停位置)。如何获得相对于droppable的实时悬停位置?
over: function (event, ui) {
$(this).css("background-color", "red");
$(".droptarget").removeClass("hidden");
$(".droptarget").mousemove(function (event) {
var msg = "Handler for .mousemove() called at ";
msg += event.pageX + ", " + event.pageY;
console.log(msg);
});
}
谢谢!