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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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).