views:

204

answers:

2

I search a good way to put <li> entrys into other <ul> container. The clue is, that when the <li> element is dropped into it's origin <ul> it should be reverted to it's origin place. I do not want them to be sortable. When it is droppen on an other list, it should be added to that <ul>.

I am using the sortable plugin with the "connectWith:" option, but it does not work how I want.

Do you have some ideas, how it could work? Or whitch plugin is better for that idea.

A: 

You might need to maintain some metadata about original positioning using attrs on your li or the jquery .data() method and then resort the list "manually" when the drop event fires:

$('.selector').droppable({
   drop: function(event, ui) { ... }
});
danb
A: 

Couldn't you just use the draggable and droppable utilities instead of the sortable?

sanchothefat