I'm using the dragula library to create a drag and drop interaction.
Each time an item is dropped, the following code fires:
dragula([$("#left").get(0)])
.on("dragend", function(el, target, src) {
items = []; // reset items
$(".item").each(function(idx, item) {
items.push($(item).text());
});
This gets the text from the items and adds it to an array.
All good. This part works great.
Now, if I change the value of the variables in the array, how can I push this change back to the dragula interaction so the order of the items matches the array?
Thanks!
indexand manipulate it..You are not suppose to extract and push it back..