I have a table that looks something like this:
<table>
<tr id="1">
<td>bla</td>
</tr>
<tr id="2">
<td>bla</td>
</tr>
<tr id="3">
<td>bla</td>
</tr>
<tr id="4">
<td>bla</td>
</tr>
</table>
I also got an array according to which I should sort this table rows, say array goes something like
array= [3, 4, 1, 2];
Any tips or ideas how I can rearrange rows with jquery/javascript to match the array?