Sortable: Doesn't work on html tables

Created on 13 Mar 2015  路  7Comments  路  Source: SortableJS/Sortable

I can get this working on any element, but throw a table in the mix and all bets are off:

Here is a working unordered list: https://jsfiddle.net/pe7jy5w4/

And here is the same code with an html table: https://jsfiddle.net/pe7jy5w4/1/

question

All 7 comments

Because you forgot about tbody: https://jsfiddle.net/pe7jy5w4/2/

That would be it

thanks!

@RubaXa any reason why while you are dragging the row of the table, it seems the content is not really following? the ghost does update when you get to the right position, but you don鈥檛 really see what you are dragging compared to when using a list.

You can see the difference in behavior here: https://jsfiddle.net/y82mmyam/

It seems like a table row can鈥檛 exist outside of a table, so it can鈥檛 just float above the page like the dragged list item.

What if I want to move <tbody> elements and their <tr> children as a group within the <table> element?

Thank you so much for this answer! Helped me a ton! Thank you also for the great product.

thank you for your help . I spend lots of time to find out how to deal with this .thank you .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artaommahe picture artaommahe  路  4Comments

seltix5 picture seltix5  路  3Comments

pageYe123 picture pageYe123  路  3Comments

kaermomo picture kaermomo  路  3Comments

FINDarkside picture FINDarkside  路  3Comments