ドラッグ アンド ドロップで並べ替え可能なアイテムを 1 つの列に配置するテーブルを作成したいと考えていますが、個々の列内のアイテムの移動が他の列内のアイテムの位置に影響を与えることはありません。
以下のコードは、右の列だけでなく、行全体 (左と右の列の両方) を並べ替えます。JQuery UI ドキュメントでは対処されていないようです。誰もこれをやろうとしたことがありますか?
<script>
$(function() {
$("table tbody").sortable({
handle: '.handle'
}).disableSelection();
});
</script>
<table>
<tbody id="sortable">
<tr>
<td>1 - Column Item I Want to Stay In Place</td>
<td class="handle">Item 1 - The Part That Should Be Draggable/Sortable</td>
</tr>
<tr>
<td>2 - Column Item I Want to Stay In Place</td>
<td>Item 2 - The Part That Should Be Draggable/Sortable</td>
</tr>
<tr>
<td>3 - Column Item I Want to Stay In Place</td>
<td class= "handle">Item 3 - The Part That Should Be Draggable/Sortable</td>
</tr>
</table>