Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 可拖动和可下降,不提供最新位置?_Php_Jquery - Fatal编程技术网

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位置