I'm dragging new item to sortable list, but when I call ui.item it points to original object. How can I get reference to new dropped object?
Link to same problem in jQuery forum:
http://forum.jquery.com/topic/sortable-receive-how-do-i-get-new-item
I'm dragging new item to sortable list, but when I call ui.item it points to original object. How can I get reference to new dropped object?
Link to same problem in jQuery forum:
http://forum.jquery.com/topic/sortable-receive-how-do-i-get-new-item
You could use update instead of receive to get a handle to the newly dropped object.
I've created a small demo that changes the color of the dropped object to red after dropping. It does rely on the class name of the clone to differentiate between a received clone and an internal sort (otherwise everything would end up red after sorting).