Php 可拖动和可下降,不提供最新位置?
请查看下面我的代码Php 可拖动和可下降,不提供最新位置?,php,jquery,Php,Jquery,请查看下面我的代码 $(".drag").draggable({ helper: 'clone', cursor: 'move', tolerance: 'fit', revert: true, }); $("#droppable").droppable({ accept: '.drag', activeClass: "drop-area", drop: function(e, ui) { if ($(ui.draggab
$(".drag").draggable({
helper: 'clone',
cursor: 'move',
tolerance: 'fit',
revert: true,
});
$("#droppable").droppable({
accept: '.drag',
activeClass: "drop-area",
drop: function(e, ui) {
if ($(ui.draggable)[0].id != "") {
$("#placeholderimg").css("visibility", "show");
x = ui.helper.clone();
ui.helper.remove();
x.draggable({
helper: 'original',
cursor: 'move',
containment: '#droppable',
tolerance: 'fit',
drop: function(event, ui) {
$(ui.draggable).remove();
}
});
}
}
});
过程:-
用户将在LHS上有一些图像,他们将把这些图像抓取到右侧面板中
但问题是,当我移动被拖动的图像时,新的位置并没有得到。实际上,我希望在图像移动到某个位置并离开后得到新的位置
请帮助您能否也提供您的html。这很容易理解understand@yeshansachithak抱歉位太大,这是类似的示例,但只需要根据容器而不是主体的最终x-y位置