1
これは私がこれまで持っているものです:何かが何か他のものの上にマウスを移動した場合オブジェクトが別のオブジェクトにドラッグされたときを検出しますか?
onMouseMove: function(event) {
clearTimeout(ics.timeout);
ics.timeout = setTimeout(function() {
var mouseX = event.pageX,
mouseY = event.pageY;
$(event.target).parents('li').siblings('li').not('.ui-placeholder').each(function() {
var li = $(this),
leftMin = li.offset().left,
leftMax = parseInt(li.offset().left) + parseInt(li.width()),
topMin = li.offset().top,
topMax = parseInt(li.offset().top) + parseInt(li.height());
var insideX = (mouseX > leftMin && mouseX < leftMax) ? true : false,
insideY = (mouseY > topMin && mouseY < topMax) ? true : false;
if (insideX && insideY) {
console.log('hovering over another item!');
console.log(this);
return false;
}
});
}, 300);
}
これは私に教えてくれますし、どのようなこと何か他のものですが、誰もがよりよい解決策を考え出すことができれば不思議?
あなたはもちろん素晴らしい人間です。独創的な単純さ、ありがとう。 –
あなたがdroppableを使用していない場合、何を使用できますか? (それなしの要素をドラッグする) – KevinDeus