Sortables: How to get the position an item is dropped?

Sortables: How to get the position an item is dropped?

I've been struggling with this for a while now! I have a series of connected lists and drag and drop between them. In receive I try to get the position it was dropped at like so:

  1. receive: function(e, ui) {
  2.     var index = $(ui.item).parent().children().index(ui.item);
but this gives me the position of the source item. How can I get the index it was dropped at in the target sortable?