Jonathan Wood
Jonathan Wood

Reputation: 67193

Drag Multiple Items using jQuery UI Sortable

I'm trying to use jQuery UI Sortable component to arrange rows within a table. (Code and markup posted at http://jsfiddle.net/LpyXh/.)

But I want to be able to drag groups of rows. In my example, whenever I drag a row, I also want to drag all the rows that have the current row as the parent (data-parent attribute). The result is that children will always be with their parent. Note that the rows I want to drag will always be grouped together.

But it's not looking like Sortable supports this. Any suggestions?

Upvotes: 1

Views: 1566

Answers (1)

CoderMarkus
CoderMarkus

Reputation: 1118

What about breaking up your parent/child groups into their own tables. Then you can just drag the tables. Wouldn't that be cleaner?

Upvotes: 1

Related Questions