jquery ui sortable - current element
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
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;
}
精彩评论