JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tbody id="data">
<tr id="1">
<td>Row 1</td>
<td>Row 1</td>
</tr>
<tr id="2">
<td>Row 2</td>
<td>Row 2</td>
</tr>
<tr id="3">
<td>Row 3</td>
<td>Row 3</td>
</tr>
<tr id="4">
<td>Row 4</td>
<td>Row 4</td>
</tr>
</tbody>
</table>
CSS
td {
padding: 5px 10px;
}
JavaScript
$(document).ready(function(){
$("#data").sortable({
items: 'tr',
stop : function(event, ui){
alert($(this).sortable('toArray'));
}
});
$("#data").disableSelection();
});//ready