First of all, thanks for your great plugin.
I used your plugin with table, but onEnd & 'OnUpdate' event returned zero for newIndex & oldIndex.
I'm using latest version.
var el = $('.sortable > tbody')[0];
var sortable = Sortable.create(el, {
handle: '.handle',
ghostClass: 'ghost',
chosenClass: 'chosen',
animation: 150,
onEnd: function (e) {
console.log(e.oldIndex); // 0
console.info(e.newIndex); // 0
// for now I handled this issue like this
console.log($(e.item).index());
}
});
use dev branch,it's solve this problem
https://github.com/RubaXa/Sortable/tree/dev
Most helpful comment
use dev branch,it's solve this problem
https://github.com/RubaXa/Sortable/tree/dev