I don't know how to recognize sortable from which item comes. It is two sortables and one draggable. Two sortables are connected to each other and draggable could be dragged into the lists. I need to recognize from which list item comes. http://jsfiddle.net/qAS93/
<ul>
<li id="draggable" class="ui-state-highlight">Drag me down</li>
</ul>
<ul class="sortable">
<li class="ui-state-default">Item 1</li>
<li class="ui-state-default">Item 2</li>
<li class="ui-state-default">Item 3</li>
<li class="ui-state-default">Item 4</li>
<li class="ui-state-default">Item 5</li>
</ul>
<ul class="sortable">
<li class="ui-state-default">Item 1</li>
<li class="ui-state-default">Item 2</li>
<li class="ui-state-default">Item 3</li>
<li class="ui-state-default">Item 4</li>
<li class="ui-state-default">Item 5</li>
</ul>
$(".sortable").sortable({
connectWith: ".sortable",
revert: true,
receive: function(){
$('#text').text('I don't know from which list item comes');
}
});
$("#draggable").draggable({
connectToSortable: ".sortable",
helper: "clone",
revert: "invalid"
});