Closed RemyyB closed 7 years ago
I'm assuming your items are originally stored in some array.
var originalIndex = event.detail.originalIndex;
var spliceIndex = event.detail.spliceIndex
var movedItem = yourArray[originalIndex];
yourArray.splice(originalIndex, 1); // Remove item from the previous position
yourArray.splice(spliceIndex, 0, movedItem); // Insert item in the new position
Question, what's the variable yourArray (sorry, I'm a Javascript noob)
substitute it for the array you use to store the items you're reordering.
Hi, I'm using this plugin, but now I'd like to get the order of all the targets. I really don't know how to do this. In the slip:reorder and then spliceIndex I saw it, but I really don't know how to use this.
Thanks!