Using sortable on TBODY elements within a TABLE?
I have a table something like the following:
- <table>
- <thead><tr><th>Col 1</th><th>Col 2</th></tr></thead>
- <tbody>
- <tr>...</tr>
- <tr>...</tr>
- </tbody>
- ...
- <tbody>
- <tr>...</tr>
- <tr>...</tr>
- </tbody>
- </table>
I want to make the tbody's sortable, so:
- $('table').sortable({ items: 'tbody' });
And this does kinda work: you can drag and drop the tbody elements. But
- There's no indication where you're going to drop. Attempts at defining a placeholder have no effect, and there doesn't appear to be any way for me to say "insert this tbody as a placeholder".
- When using sortable on table rows (as opposed to TBODY's), you at least get a blank space.
Any pointers on how to achieve this with jQuery UI, or if not, any other library/plugin I can use
for this?
thanks,
Neil