views:

15

answers:

1

I have had no luck figuring out how to do this. I was originally using jQuery UI sortable, but I am not sure it will work with this workflow:

I have a table with multiple columns. I want to be able to drag an element in column A AND the element next to it in column B at once and drop them into a different position. After the drop, the element from column A & B will still be side-by-side but not at their original Y coordinate. The key is dragging them at once & allowing other elements that cross their paths to "move out of the way".

I was able to achieve this with 1 element using jquery UI sortable, but am not sure how to make this work with two side-by-side elements. Any suggestions any help is more than welcome. Thanks in advance.

A: 

Can't you just use row's as handlers?

By your description A & B are always 1 element being dragged.

Frankie
well, there is one element to move in each row, so a total of 2 elements. Perhaps I am not understanding correctly?
@user486979 what I meant is why not to attach the handler to the row instead of the individual elements?
Frankie