JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tbody>
<tr>
<td><input type="checkbox" /></td>
<td>1</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>3</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>A</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>B</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>C</td>
</tr>
</tbody>
</table>
JavaScript
$('table tr').each(function () {
var $this = $(this).data({position: $(this).index()}),
$table = $this.closest('table'),
$input = $this.find('input');
$input.bind('click', function (e) {
var $first = $table.find('tr:first'),
position;
if ($(this).is(':checked')) {
position = $first.data('position');
$table.find('tr input').not($(this)).removeAttr('checked');
if (position != 0) $first.insertAfter($table.find('tr').eq(position));
$this.prependTo($table);
} else if ($this.data('position') != 0) {
position = $this.data('position');
$this.insertAfter($table.find('tr').eq(position));
}
});
});