Hello, I'm trying to move cell values within a three by three table. I have read about the 2D matrix algorithm similar. But I am moving one cell at a time with the click of a button. Is this possible with jQuery or JS? I have the following table:

[1][2][3]
[4][5][6]
[7][8][9]

and I want to click a button to move right like so:

[4][1][2]
[7][5][3]
[8][9][6]

and so on..

this is my HTML:

<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr><tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr><tr>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</table>

<button id="moveStuff">Move!</button>

Any help is greatly appreciated.