开发者

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜