Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.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
Jquery ui JQuery UI可排序接收事件不存在';t捕获同一列表中的拖放。你喜欢哪个项目?_Jquery Ui_Jquery Ui Sortable - Fatal编程技术网

Jquery ui JQuery UI可排序接收事件不存在';t捕获同一列表中的拖放。你喜欢哪个项目?

Jquery ui JQuery UI可排序接收事件不存在';t捕获同一列表中的拖放。你喜欢哪个项目?,jquery-ui,jquery-ui-sortable,Jquery Ui,Jquery Ui Sortable,使用jQueryUISortable,我对“receive”事件进行了ajax调用。它捕获将卡片从一个列表拖放到另一个列表。但是,它不会捕获将卡片从列表中拖到列表中其他位置的情况。代码如下: <script src="http://code.jquery.com/jquery-3.2.1.js"></script> <script src="http://code.jquery.com/ui/1.12.1/jquery-ui.js"></script&g

使用jQueryUISortable,我对“receive”事件进行了ajax调用。它捕获将卡片从一个列表拖放到另一个列表。但是,它不会捕获将卡片从列表中拖到列表中其他位置的情况。代码如下:

<script src="http://code.jquery.com/jquery-3.2.1.js"></script>
<script src="http://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

<script type="text/javascript">
$(function linkUp() {
    $("#IssueList25").sortable({
        connectWith: ".connectedSortable",
        receive: function(event, ui) {
            var droppedIssueId = ui.item.attr("id");
            var destListId = this.id;
            var sourceListId = ui.sender[0].id;
            var destList = $('#IssueList25').sortable('toArray').toString();

            $.ajax({
                async: true,
                type: "GET",
                url: "Lists.aspx",
                data:"event=receive&sourceListId = " + sourceListId + "&destListId = " + destListId + "&droppedIssueId=" + droppedIssueId + "&destList=" + destList,
                dataType: "text"
            });
        }
    });});
</script>

$(函数链接(){
$(“#发行列表25”)。可排序({
connectWith:“.connectedSortable”,
接收:功能(事件、用户界面){
var droppedIssueId=ui.item.attr(“id”);
var destListId=this.id;
var sourceListId=ui.sender[0].id;
var destList=$('#IssueList25')。可排序('toArray')。toString();
$.ajax({
async:true,
键入:“获取”,
url:“Lists.aspx”,
数据:“event=receive&sourceListId=“+sourceListId+”&destListId=“+destListId+”&droppedIssueId=“+droppedIssueId+”&destList=“+destList,
数据类型:“文本”
});
}
});});

将卡放入同一列表时是否会触发其他事件

答案似乎是“out”,尽管从一个列表拖动到另一个列表时会触发两次