Sortable
Sortable copied to clipboard
How to move to a new index inside onChange, while dragged
I am looking to do something like that:
onChange: function (evt) {
if (evt.newIndex === 0) {
evt.newIndex = 14
}
if (evt.newIndex > 3 && evt.newIndex < 7) {
evt.newIndex = 12
}
}
The ghost should follow the new index.
Note: inside onChange, I see the sortable object but I don't see the sortable.ghost. Is there a method inside .ghost to move the element?