views:

27

answers:

1

Hi, i can drop a draggable element into a sortable list.

$( ".selector" ).draggable({ connectToSortable: '#myList' });

But how can i drop the element back? The sortout event works only with a second list :/

kind regards Peter

EDIT: working example http://www.jsfiddle.net/V9Euk/114/

A: 

Take a look jQuery droppable

http://docs.jquery.com/UI/Droppable

So:

$('#droppable').droppable({
    drop: function() { //Do something }
});
MRW
It works, but the drop event start also when i sort the list ... here is an example http://www.jsfiddle.net/V9Euk/114/ Thanks for the fast answer.
Peter
If it is just sorting that you are looking to do then sortable has a drag and drop sorting method so draggable and droppable may not be necessary! http://docs.jquery.com/UI/Sortable#overview
MRW