Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/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 ConnectedSortable双击_Jquery - Fatal编程技术网

jQuery ConnectedSortable双击

jQuery ConnectedSortable双击,jquery,Jquery,我在jQueryUI中有两个与connectedSortable连接的列表,但我想添加一个功能,可以双击一个项目并将其移动到另一个列表,但我真的不知道如何操作 $j('#list-one li').dblclick(function() { var litem = $j(this).clone(); litem.appendTo($j('#list-two')); $j(this).remove(); }); 结果是这样的您需要将单击事件绑定到要移动的元素,并将

我在jQueryUI中有两个与connectedSortable连接的列表,但我想添加一个功能,可以双击一个项目并将其移动到另一个列表,但我真的不知道如何操作

  $j('#list-one li').dblclick(function() {
    var litem = $j(this).clone();
    litem.appendTo($j('#list-two'));
    $j(this).remove();
  });

结果是这样的

您需要将单击事件绑定到要移动的元素,并将其附加到需要显示的列表中。