finding the target with sortable

finding the target with sortable


I'm trying to use sortable for the first time. I want to move a list
item from one unordered list to another, but I don't know how to get
the *new* list id once the list item is moved.
Here's how I've set up my sortable:
$('ul.task_list').sortable({connectWith: $('ul.task_list'), update:
resetList});
And my update callback is:
var resetList = function(e,ui){
    var task_id = $(e.target).attr('id');
    var task_rails_id = task_id.match(/[0-9]+/);
    var list_id = $(e.target).parents('ul').attr('id');
    var list_rails_id = list_id.match(/[0-9]+/);
    var reset_path = "/task_lists/"+list_rails_id+"/
adopt_task/"+task_rails_id;
    $.post(reset_path,{task_list_id: list_rails_id, id: task_rails_id});
}
This doesn't work.
$(e.target).parents('ul') seems to always refer the the originating
list. Is there a way to find the ending list after the mouse
releases?
I don't understand how to do this from the documentation.
I haven't yet tried draggable/droppable because the sortable is so
simple to setup (assuming that it can do this).