views:

15

answers:

1

Hi,

I'm using jQuery UI sortable to build a dashboard userface. I'm wondering how I can fetch the item I was sorting last?

What I want to do: I'm using the update event to fire a function > showing a hint, that the new position has been saved. I want to attach the DIV the moved element but therefore I have to know which one it was. Any ideas?

thx TC

A: 

If you want the item you just dragged (and dropped - to trigger the update), jQuery gives it to you in the callback function.

update: function(event, ui) {
    var theElementYouDragged = ui.item;
}
Simen Echholt