How to Update Ranking on jQuery UI Sortable Table Rows

How to Update Ranking on jQuery UI Sortable Table Rows

Can you please take a look at This Demo and let me know how I can Re number (order) the sortable table when the rows are sorted using jQuery UI sortable?

As you can see I have


  1. <table>
  2.     <thead>
  3.         <tr>
  4.             <th>Elem 1</th>
  5.             <th>Elem 2</th>
  6.             <th>Rank</th>
  7.         </tr>
  8.     </thead>    
  9.     <tbody>
  10.         <tr class="border_bottom">
  11.             <td>X</td>
  12.             <td>Y</td>
  13.             <td>1</td>
  14.         </tr>
  15.         <tr class="border_bottom">
  16.             <td>X</td>
  17.             <td>Y</td>
  18.             <td>2</td>
  19.         </tr>
  20.         <tr class="border_bottom">
  21.             <td>X</td>
  22.             <td>Y</td>
  23.             <td>3</td>
  24.         </tr>
  25.         <tr class="border_bottom">
  26.             <td>X</td>
  27.             <td>Y</td>
  28.             <td>4</td>
  29.         </tr>
  30.         <tr class="border_bottom">
  31.             <td>X</td>
  32.             <td>Y</td>
  33.             <td>5</td>
  34.         </tr>  
  35.     </tbody>    
  36. </table>

and


  1. $( "tbody" ).sortable();

Thanks