これは .sortable を使用して動作しています:
if ($(ui.item).find('.removeButton').length == 0){
var removeButton = $('<span class="removeButton">X</span>').click(function(){
$(this).remove();
$(this).each(function(){
$(this).appendTo($(this).attr('parentClass'));
});
});
$(ui.item).append(removeButton);
};
しかし、.draggable ではまったく動作しません。プログラマーが代わりに .draggable を使用して全体を作成したため、.sortable を使用できなくなったため、何らかの方法で変換する必要があります。かなり単純なコードのように見えるので、なぜ機能しないのかわかりません。
HTML は 2 つの領域を持つソート可能なものに似ており、一方の側をもう一方の側にドラッグします。
<div id="source">
<div id="su1">
<h3></h3>
<ul></ul>
</div>
....
</div>
<div id="destination">
<div id="su1">
<h3></h3>
<ul></ul>
</div>
....
</div>