Since the draggable event is causing the sortable events to fire, you would need to have a stop event fire such as:
`stop: function(event,ui){ console.log("This is the Index:", $(this).index());}`
see the fiddle: http://jsfiddle.net/y2tGv/1/
Question
i had some code of a draggable object which links to a sortable. The issue is that i want to get the index of the helper in regards to the sortable object.
I was trying ui.helper.index()
( and $("div.tar").index(ui.helper);
) which gets the index in relation to its siblings, but it didn't seem the indexof ui.helper in the sortable list.
Am i doing something wrong?
here is a fiddle: http://jsfiddle.net/y2tGv/
La solution
Since the draggable event is causing the sortable events to fire, you would need to have a stop event fire such as:
`stop: function(event,ui){ console.log("This is the Index:", $(this).index());}`
see the fiddle: http://jsfiddle.net/y2tGv/1/