tags:

views:

34

answers:

1

Hello all.

I have a drag andn drop option to be made for multiple widgets in my website. It should perform swapping, but not sorting of the images.

Can you suggest to me any solutions for this, with demo if possible?

A: 

I assume what you want is something pretty much like this...?

EDIT Based on your feedback, I pieced together something that makes every item both draggable and droppable, and replaces the content of the two items on drop. Hope it'll meet your needs:

http://jsbin.com/uhoku/edit

David Hedlund
in that i want widgets not to be sorted instead swapped...here sorting is taking place..if i move 'news' to 'images' then 'images' should swap to 'news'...swapping not sorting...hope u understood nw..
gayathri
ohh, i'm sorry. i thought you meant automatic sorting per some other criteria (such as alphabetic reordering in the column, once an item has been dropped there). in theory, what you want is to make sure that every `draggable` is also a `droppable`, and then have the start event save the position of the item being dragged, and the on-drop event move the drop target to the old position. i'll see if i can come up with an example of that.
David Hedlund
alright, see my edit =)
David Hedlund