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
- <table>
- <thead>
- <tr>
- <th>Elem 1</th>
- <th>Elem 2</th>
- <th>Rank</th>
- </tr>
- </thead>
- <tbody>
- <tr class="border_bottom">
- <td>X</td>
- <td>Y</td>
- <td>1</td>
- </tr>
- <tr class="border_bottom">
- <td>X</td>
- <td>Y</td>
- <td>2</td>
- </tr>
- <tr class="border_bottom">
- <td>X</td>
- <td>Y</td>
- <td>3</td>
- </tr>
- <tr class="border_bottom">
- <td>X</td>
- <td>Y</td>
- <td>4</td>
- </tr>
- <tr class="border_bottom">
- <td>X</td>
- <td>Y</td>
- <td>5</td>
- </tr>
- </tbody>
- </table>
and
- $( "tbody" ).sortable();
Thanks