I have a sortable list like this one: http://jqueryui.com/demos/sortable
Is it possible to get the start and end position of the element in the list, when it has been moved? I'm talking about their position number, in the list.
For example, if I move element 2 to position 5 in the list, I'd like to assign those two numbers to variables.
I'm new to jQuery - any help would be much appreciated.
SOLUTION:
For some reason
ui.item.index()
did not work for me.This did:
I believe what you are looking to do is done with the serialize method. Serialize is get the new order of the list.